feat 修改后端掉线时,前端加载页面一直加载的bug
parent
20a2ced413
commit
e5240cbdc0
2692
pnpm-lock.yaml
2692
pnpm-lock.yaml
File diff suppressed because it is too large
Load Diff
|
|
@ -190,6 +190,12 @@ service.interceptors.response.use(
|
|||
message = t('sys.api.apiRequestFailed') + message.substr(message.length - 3)
|
||||
}
|
||||
ElMessage.error(message)
|
||||
if (message) {
|
||||
return {
|
||||
message: '',
|
||||
success: false,
|
||||
}
|
||||
}
|
||||
return Promise.reject(error)
|
||||
}
|
||||
)
|
||||
|
|
@ -220,4 +226,5 @@ const handleAuthorized = () => {
|
|||
}
|
||||
return Promise.reject(t('sys.api.timeoutMessage'))
|
||||
}
|
||||
|
||||
export { service }
|
||||
|
|
|
|||
|
|
@ -69,7 +69,13 @@ router.beforeEach(async (to, from, next) => {
|
|||
const userStore = useUserStoreWithOut()
|
||||
const permissionStore = usePermissionStoreWithOut()
|
||||
if (!dictStore.getIsSetDict) {
|
||||
await dictStore.setDictMap()
|
||||
try {
|
||||
await dictStore.setDictMap()
|
||||
}
|
||||
// eslint-disable-next-line no-empty
|
||||
catch (error) {
|
||||
console.error(error)
|
||||
}
|
||||
}
|
||||
if (!userStore.getIsSetUser) {
|
||||
isRelogin.show = true
|
||||
|
|
|
|||
Loading…
Reference in New Issue