update
This commit is contained in:
8
src/api/Method.js
Normal file
8
src/api/Method.js
Normal 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
52
src/api/admin.js
Normal 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;
|
||||
@@ -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;
|
||||
|
||||
@@ -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,
|
||||
});
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user