Files
xl-root/src/api/system.js
2025-09-16 21:39:30 +08:00

59 lines
1.5 KiB
JavaScript

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;