fix: 修复BUG
This commit is contained in:
parent
1df9644a11
commit
c954f2b7e0
|
@ -536,11 +536,9 @@ export default [
|
||||||
response: ({ query }) => {
|
response: ({ query }) => {
|
||||||
const { roleName } = query
|
const { roleName } = query
|
||||||
return {
|
return {
|
||||||
data: {
|
|
||||||
code: code,
|
code: code,
|
||||||
data: roleName === 'admin' ? adminList : testList
|
data: roleName === 'admin' ? adminList : testList
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
] as MockMethod[]
|
] as MockMethod[]
|
||||||
|
|
|
@ -47,13 +47,11 @@ export default [
|
||||||
return {
|
return {
|
||||||
data: {
|
data: {
|
||||||
code: code,
|
code: code,
|
||||||
data: {
|
|
||||||
total: mockList.length,
|
total: mockList.length,
|
||||||
list: pageList
|
list: pageList
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
},
|
},
|
||||||
// 登录接口
|
// 登录接口
|
||||||
{
|
{
|
||||||
|
@ -67,13 +65,11 @@ export default [
|
||||||
if (user.username === data.username && user.password === data.password) {
|
if (user.username === data.username && user.password === data.password) {
|
||||||
hasUser = true
|
hasUser = true
|
||||||
return {
|
return {
|
||||||
data: {
|
|
||||||
code: code,
|
code: code,
|
||||||
data: user
|
data: user
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
if (!hasUser) {
|
if (!hasUser) {
|
||||||
return {
|
return {
|
||||||
code: 500,
|
code: 500,
|
||||||
|
@ -89,11 +85,9 @@ export default [
|
||||||
timeout,
|
timeout,
|
||||||
response: () => {
|
response: () => {
|
||||||
return {
|
return {
|
||||||
data: {
|
|
||||||
code: code,
|
code: code,
|
||||||
data: null
|
data: null
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
] as MockMethod[]
|
] as MockMethod[]
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "vue-element-plus-admin",
|
"name": "vue-element-plus-admin",
|
||||||
"version": "1.9.9",
|
"version": "2.0.0",
|
||||||
"description": "一套基于vue3、element-plus、typesScript、vite4的后台集成方案。",
|
"description": "一套基于vue3、element-plus、typesScript、vite4的后台集成方案。",
|
||||||
"author": "Archer <502431556@qq.com>",
|
"author": "Archer <502431556@qq.com>",
|
||||||
"private": false,
|
"private": false,
|
||||||
|
|
|
@ -28,7 +28,7 @@ axiosInstance.interceptors.response.use(
|
||||||
(res: AxiosResponse) => {
|
(res: AxiosResponse) => {
|
||||||
const url = res.config.url || ''
|
const url = res.config.url || ''
|
||||||
abortControllerMap.delete(url)
|
abortControllerMap.delete(url)
|
||||||
return res.data
|
return res
|
||||||
},
|
},
|
||||||
(error: AxiosError) => {
|
(error: AxiosError) => {
|
||||||
console.log('err: ' + error) // for debug
|
console.log('err: ' + error) // for debug
|
||||||
|
|
Loading…
Reference in New Issue