mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-22 02:47:27 +08:00
user-list
This commit is contained in:
Vendored
+7
@@ -19,6 +19,13 @@ const api = {
|
||||
deleteAllowAgent: (id) => {
|
||||
return axios.delete(baseUrl + 'agent-allow/' + id);
|
||||
},
|
||||
|
||||
listUser: (params = {}) => {
|
||||
return axios.get(baseUrl + 'user', {params: params});
|
||||
},
|
||||
storeUser: (params = {}) => {
|
||||
return axios.post(baseUrl + 'user', params);
|
||||
},
|
||||
}
|
||||
|
||||
export default api
|
||||
|
||||
Vendored
+6
-2
@@ -22,8 +22,8 @@ axios.interceptors.response.use(res => {
|
||||
ElMessage.error('服务端异常!')
|
||||
return Promise.reject(res)
|
||||
}
|
||||
if (res.data.data.ret && res.data.data.ret != 0) {
|
||||
ElMessage.error(res.data.data.msg)
|
||||
if (res.data.ret && res.data.ret != 0) {
|
||||
ElMessage.error(res.data.msg)
|
||||
return Promise.reject(res)
|
||||
}
|
||||
if (res.data.resultCode && res.data.resultCode != 200) {
|
||||
@@ -34,6 +34,10 @@ axios.interceptors.response.use(res => {
|
||||
return Promise.reject(res.data)
|
||||
}
|
||||
return res.data.data
|
||||
}, (error) => {
|
||||
console.log(error.response)
|
||||
ElMessage.error(error.response.data.msg || '500 Server Error')
|
||||
return Promise.reject(error)
|
||||
})
|
||||
|
||||
export default axios
|
||||
|
||||
Vendored
+4
-1
@@ -43,5 +43,8 @@ export const pathMap = {
|
||||
order: '订单管理',
|
||||
order_detail: '订单详情',
|
||||
account: '修改账户',
|
||||
"agent-allow": "允许客户端"
|
||||
"agent-allow": "允许客户端",
|
||||
"agent-allow-form": "允许客户端表单",
|
||||
"user": "用户",
|
||||
"user-form": "用户表单"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user