123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596 |
- import request from '@/utils/request'
- class ShortVideoApi {
- /** 查询短视频列表 */
- getList(query) {
- return request({
- url: 'pc/teachingDsp/dsp/list',
- method: 'get',
- params: {
- status: 0,
- ...query,
- },
- })
- }
- /** 查询短视频详情 */
- getVideoInfo(Id) {
- return request({
- url: 'pc/teachingDsp/dsp/' + Id,
- method: 'get',
- })
- }
- /** 新增短视频 */
- addVideo(data) {
- return request({
- url: 'pc/teachingDsp/dsp',
- method: 'post',
- data: data,
- })
- }
- /** 修改短视频信息 */
- updateVideo(data) {
- return request({
- url: 'pc/teachingDsp/dsp',
- method: 'put',
- data: data,
- })
- }
- /** 删除短视频 */
- delVideo(ids) {
- return request({
- url: 'pc/teachingDsp/dsp/' + ids,
- method: 'put',
- })
- }
- /** 上传视频封面 */
- uploadCover(data, fn) {
- return request({
- url: 'pc/teachingDsp/dsp/coverUp',
- method: 'put',
- headers: {
- 'content-type': 'multipart/form-data',
- },
- data,
- onUploadProgress: fn,
- timeout: 0,
- })
- }
- /** 修改上架状态 */
- changeUserStatus(id, shelfStatus) {
- if (shelfStatus != 0) {
- return request({
- url: 'pc/teachingDsp/dsp/offShelf/' + id,
- method: 'put',
- })
- } else {
- return request({
- url: 'pc/teachingDsp/dsp/putShelf/' + id,
- method: 'put',
- })
- }
- }
- /**下架短视频 */
- offShelf(ids) {
- return request({
- url: 'pc/teachingDsp/dsp/offShelf/' + ids,
- method: 'put',
- })
- }
- /**上架短视频 */
- putShelf(ids) {
- return request({
- url: 'pc/teachingDsp/dsp/putShelf/' + ids,
- method: 'put',
- })
- }
- }
- export default new ShortVideoApi()
|