admin base table and form

This commit is contained in:
xiaomlove
2021-04-23 01:28:41 +08:00
parent 4903fa1c90
commit d164bb15ed
14 changed files with 530 additions and 24 deletions

View File

@@ -1,6 +1,12 @@
import axios from "./axios";
const api = {
login: (params = {}) => {
return axios.post('login', params);
},
logout: (params = {}) => {
return axios.post('logout');
},
listAllowAgent: (params = {}) => {
return axios.get('agent-allow', {params: params});
},
@@ -20,6 +26,9 @@ const api = {
listUser: (params = {}) => {
return axios.get('user', {params: params});
},
getUserBase: (params = {}) => {
return axios.get('user-base', {params: params});
},
storeUser: (params = {}) => {
return axios.post('user', params);
},

View File

@@ -1,11 +1,13 @@
import axios from 'axios'
import { ElMessage } from 'element-plus'
import {localGet} from "./index";
axios.defaults.baseURL = 'http://nexus-php8.tinyhd.net'
axios.defaults.baseURL = 'http://nexus-php8.tinyhd.net/api'
axios.defaults.withCredentials = true
axios.defaults.headers['X-Requested-With'] = 'XMLHttpRequest'
axios.defaults.headers['Content-Type'] = 'application/json'
axios.defaults.headers['Accept'] = 'application/json'
axios.defaults.headers['Authorization'] = 'Bearer ' + localGet('token')
// 请求拦截器,内部根据返回值,重新组装,统一管理。
axios.interceptors.response.use(res => {

View File

@@ -47,4 +47,6 @@ export const pathMap = {
'agent-allow-form': 'Agent allow form',
'user': 'User',
'user-form': 'User form',
'exam': 'Exam',
'exam-form': 'Exam form',
}