|
@@ -218,21 +218,21 @@ const handleAuthorized = () => {
|
|
|
const { t } = useI18n()
|
|
|
if (!isRelogin.show) {
|
|
|
isRelogin.show = true
|
|
|
- ElMessageBox.confirm(t('sys.api.timeoutMessage'), t('common.confirmTitle'), {
|
|
|
- showCancelButton: false,
|
|
|
- closeOnClickModal: false,
|
|
|
- showClose: false,
|
|
|
- confirmButtonText: t('login.relogin'),
|
|
|
- type: 'warning'
|
|
|
- }).then(() => {
|
|
|
- const { wsCache } = useCache()
|
|
|
- resetRouter() // 重置静态路由表
|
|
|
- wsCache.clear()
|
|
|
- removeToken()
|
|
|
- isRelogin.show = false
|
|
|
- // 干掉token后再走一次路由让它过router.beforeEach的校验
|
|
|
- window.location.href = window.location.href
|
|
|
- })
|
|
|
+ // ElMessageBox.confirm(t('sys.api.timeoutMessage'), t('common.confirmTitle'), {
|
|
|
+ // showCancelButton: false,
|
|
|
+ // closeOnClickModal: false,
|
|
|
+ // showClose: false,
|
|
|
+ // confirmButtonText: t('login.relogin'),
|
|
|
+ // type: 'warning'
|
|
|
+ // }).then(() => {
|
|
|
+ const { wsCache } = useCache()
|
|
|
+ resetRouter() // 重置静态路由表
|
|
|
+ wsCache.clear()
|
|
|
+ removeToken()
|
|
|
+ isRelogin.show = false
|
|
|
+ // 干掉token后再走一次路由让它过router.beforeEach的校验
|
|
|
+ window.location.href = window.location.href
|
|
|
+ // })
|
|
|
}
|
|
|
return Promise.reject(t('sys.api.timeoutMessage'))
|
|
|
}
|