Files
xl-root/src/api/system.js

59 lines
1.5 KiB
JavaScript
Raw Normal View History

2025-03-10 19:01:21 +08:00
import request from "../utils/request.js";
2025-04-19 15:28:32 +08:00
import Method from "./Method.js";
2025-09-16 21:39:30 +08:00
import Qiniu from "../utils/Qiniu.js";
2025-03-10 19:01:21 +08:00
const system = {
getData: async (params) => {
return request({
url: '/m1/5995958-5684445-default/getList',
2025-04-19 15:28:32 +08:00
method: Method.POST,
2025-03-10 19:01:21 +08:00
data: params
});
2025-03-14 19:03:13 +08:00
},
getSelect: async () => {
return request({
url: '/m1/5995958-5684445-default/getSelectList',
2025-04-19 15:28:32 +08:00
method: Method.GET,
2025-03-14 19:03:13 +08:00
});
},
2025-04-21 19:57:04 +08:00
getRange: async () => {
return new Promise((resolve) => {
resolve({
data: [
{
id: 1,
name: '≥'
},
{
id: 2,
name: '<'
}
]
});
})
2025-04-23 19:48:47 +08:00
},
2025-09-16 21:39:30 +08:00
getUploadToken: async () => {
2025-04-23 19:48:47 +08:00
return request({
UN_AES: true,
2025-09-16 21:39:30 +08:00
url: `/${import.meta.env.VITE_BUILD_MODE === 'admin' ? 'admin' : 'index'}/Upload/webToken`,
method: Method.GET,
2025-04-23 19:48:47 +08:00
});
2025-04-29 19:43:06 +08:00
},
2025-09-16 21:39:30 +08:00
uploadFile: async (file) => {
const qiniu = await Qiniu.getInstance();
const path = await qiniu.uploadFile(file);
return {
data: path,
}
},
2025-04-29 19:43:06 +08:00
uploadFile2: async (file) => {
2025-09-16 21:39:30 +08:00
const qiniu = await Qiniu.getInstance();
const path = await qiniu.uploadFile(file);
return {
data: path,
}
2025-04-29 19:43:06 +08:00
},
2025-03-10 19:01:21 +08:00
}
export default system;