import request from "../utils/request.js"; import Method from "./Method.js"; import Qiniu from "../utils/Qiniu.js"; const system = { getData: async (params) => { return request({ url: '/m1/5995958-5684445-default/getList', method: Method.POST, data: params }); }, getSelect: async () => { return request({ url: '/m1/5995958-5684445-default/getSelectList', method: Method.GET, }); }, getRange: async () => { return new Promise((resolve) => { resolve({ data: [ { id: 1, name: '≥' }, { id: 2, name: '<' } ] }); }) }, getUploadToken: async () => { return request({ UN_AES: true, url: `/${import.meta.env.VITE_BUILD_MODE === 'admin' ? 'admin' : 'index'}/Upload/webToken`, method: Method.GET, }); }, uploadFile: async (file) => { const qiniu = await Qiniu.getInstance(); const path = await qiniu.uploadFile(file); return { data: path, } }, uploadFile2: async (file) => { const qiniu = await Qiniu.getInstance(); const path = await qiniu.uploadFile(file); return { data: path, } }, } export default system;