This commit is contained in:
2025-04-19 15:28:32 +08:00
parent c80b173e28
commit 9731d104f6
17 changed files with 796 additions and 738 deletions

8
src/api/Method.js Normal file
View File

@@ -0,0 +1,8 @@
const Method = {
GET: 'GET',
POST: 'POST',
PUT: 'PUT',
DELETE: 'DELETE',
}
export default Method;

52
src/api/admin.js Normal file
View File

@@ -0,0 +1,52 @@
import request from "../utils/request.js";
import Method from "./Method.js";
const admin = {
login: async (data) => {
return request({
url: '/admin/login/login',
method: Method.POST,
data: data,
});
},
phoneLogin: async (data) => {
return request({
url: '/admin/login/mobileLogin',
method: Method.POST,
data: data,
});
},
sendSms: async (mobile) => {
return request({
url: '/admin/login/sendSms',
method: Method.POST,
data: {mobile},
});
},
getMenu: async () => {
return request({
url: '/admin/admin/menu',
method: Method.POST,
});
},
getTaskList: async () => {
return request({
url: '/admin/task/getStatusList',
method: Method.POST,
});
},
getPlatform: async () => {
return request({
url: '/admin/platform/getList',
method: Method.POST,
});
},
getCheckStatusList: async () => {
return request({
url: '/admin/task/getCheckStatusList',
method: Method.POST,
});
},
}
export default admin;

View File

@@ -1,7 +1,9 @@
import system from './system.js';
import admin from './admin.js';
const Api = {
system: {...system}
system: {...system},
admin: {...admin},
}
export default Api;

View File

@@ -1,17 +1,18 @@
import request from "../utils/request.js";
import Method from "./Method.js";
const system = {
getData: async (params) => {
return request({
url: '/m1/5995958-5684445-default/getList',
method: "POST",
method: Method.POST,
data: params
});
},
getSelect: async () => {
return request({
url: '/m1/5995958-5684445-default/getSelectList',
method: "GET",
method: Method.GET,
});
},
}