mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-20 17:37:23 +08:00
agent-allow-table
This commit is contained in:
Vendored
+11
@@ -0,0 +1,11 @@
|
||||
import axios from "./axios";
|
||||
|
||||
const baseUrl = 'http://nexus-php8.tinyhd.net/api/';
|
||||
|
||||
const api = {
|
||||
listAllowAgent: (params = {}) => {
|
||||
return axios.get(baseUrl + 'agent-allow', {params: params});
|
||||
}
|
||||
}
|
||||
|
||||
export default api
|
||||
Vendored
+3
-2
@@ -17,11 +17,12 @@ axios.defaults.headers.post['Content-Type'] = 'application/json'
|
||||
|
||||
// 请求拦截器,内部根据返回值,重新组装,统一管理。
|
||||
axios.interceptors.response.use(res => {
|
||||
console.log(res)
|
||||
if (typeof res.data !== 'object') {
|
||||
ElMessage.error('服务端异常!')
|
||||
return Promise.reject(res)
|
||||
}
|
||||
if (res.data.resultCode != 200) {
|
||||
if (res.data.resultCode && res.data.resultCode != 200) {
|
||||
if (res.data.message) ElMessage.error(res.data.message)
|
||||
if (res.data.resultCode == 419) {
|
||||
router.push({ path: '/login' })
|
||||
@@ -32,4 +33,4 @@ axios.interceptors.response.use(res => {
|
||||
return res.data.data
|
||||
})
|
||||
|
||||
export default axios
|
||||
export default axios
|
||||
|
||||
Vendored
+3
-2
@@ -42,5 +42,6 @@ export const pathMap = {
|
||||
guest: '会员管理',
|
||||
order: '订单管理',
|
||||
order_detail: '订单详情',
|
||||
account: '修改账户'
|
||||
}
|
||||
account: '修改账户',
|
||||
"agent-allow": "允许客户端"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user