import { get, post } from "@/api/index";
export default{
    /**
     * 获取视频列表
     * @param {Object} params
     * @param {Object} params.CurrentIndex
     * @param {Object} params.PageSize
     * @param {Object} params.SortType asc desc
     * @returns 
     */
    getVideoList: params => {
        return get('/media/videoList',params)
    },
    /**
     * 上传视频文件
     * @param {Object} params
     * @param {File} params.File
     * @returns res.Data {Url:'',FileName:'',DurationMillisecond:0}
     */
    uploadVideoFile: params => {
        return post('/media/uploadVideo',params)
    },
    /**
     * 上传视频封面
     * @param {Object} params
     * @param {File} params.File
     * @returns res.Data {Url:'',FileName:''}
     */
    uploadVideoCover: params => {
        return post('/media/uploadFile',params)
    },
    /**
     * 添加视频
     * @param {Object} params
     * @param {Object} params.VideoName 视频标题
     * @param {Object} params.AnalystId 
     * @param {Object} params.AnalystName
     * @param {Object} params.SrcUrl
     * @param {Object} params.CoverSrc
     * @param {Object} params.PermissionIds 所属二级品种，用,隔开
     * @param {Object} params.DurationMillisecond 视频长度 单位毫秒
     * @returns 
     */
    addVideo: params => {
        return post('/media/addVideo',params)
    },
    /**
     * 
     * @param {*} params 
     * VideoId
     * @returns 
     */
    editVideo: params => {
        return post('/media/editVideo',params)
    },
    /**
     * 删除视频
     * @param {Object} params 
     * @param {Number} params.VideoId
     * @returns 
     */
    deleteVideo: params => {
        return post('/media/deleteVideo',params)
    }
}