import { get, post } from "@/api/index";

export default{
    /**
     * 图片资源库-列表
     * @param {Object} params
     * @param {Number} params.PageSize
     * @param {Number} params.CurrentIndex
     * @param {String} params.SortType asc desc
     * @param {String} params.PermissionIds ,号隔开
     * @param {String} params.KeyWord
     * @returns 
     */
    getImgSourceList:params=>{
        return get('/source/imageList',params)
    },
    /**
     * 上传图片
     * @param {Object} params
     * @param {File} params.File
     * @returns res.Data {Url:'',FileName:''}
     */
    uploadImgFile:params=>{
        return post('/source/uploadImage',params)
    },
    /**
     * @param {Object} params
     * @param {String} params.ImageName
     * @param {String} params.SrcUrl
     * @param {Number} params.PermissionId 
     * @returns 
     */
    addImgSource:params=>{
        return post('/source/addImage',params)
    },
    /**
     * @param {Object} params
     * @param {Number} params.ImageId
     * @param {String} params.ImageName
     * @param {String} params.SrcUrl
     * @param {Number} params.PermissionId 
     * @returns 
     */
    editImgSource:params=>{
        return post('/source/editImage',params)
    },
    /**
     * @param {Object} params
     * @param {Number} params.ImageId
     * @returns 
     */
    deleteImgSource:params=>{
        return post('/source/deleteImage',params)
    }
}