|
|
@@ -40,7 +40,17 @@ const handleCode = (code, msg) => {
|
|
|
)
|
|
|
store.dispatch('user/resetAccessToken')
|
|
|
if (loginInterception) {
|
|
|
- location.reload()
|
|
|
+ try {
|
|
|
+ const fullPath = router.currentRoute.fullPath
|
|
|
+ if (recordRoute && fullPath) {
|
|
|
+ router.push(`/login?redirect=${fullPath}`)
|
|
|
+ } else {
|
|
|
+ router.push('/login')
|
|
|
+ }
|
|
|
+ } catch (e) {
|
|
|
+ // 兜底:直接跳转登录页
|
|
|
+ window.location.href = '/login'
|
|
|
+ }
|
|
|
}
|
|
|
break
|
|
|
case noPermissionCode:
|