/* * @Date: 2024-03-23 09:49:06 * @LastEditors: Sneed * @LastEditTime: 2024-04-13 20:20:48 * @FilePath: /belleson-frontend/Users/mache/Documents/demo/cps-web/src/config/upload.js */ import API from "@/api"; //上传配置 export default { apiObj: API.common.upload, //上传请求API对象 filename: "file", //form请求时文件的key successCode: 200, //请求完成代码 maxSize: 10, //最大文件大小 默认10MB parseData: function (res) { return { code: res.code, //分析状态字段结构 fileName: res.data.name,//分析文件名称 src: res.data.name, //分析图片远程地址结构 msg: res.msg //分析描述字段结构 } }, apiObjFile: API.common.uploadFile, //附件上传请求API对象 maxSizeFile: 10 //最大文件大小 默认10MB }