fix: 记录上次访问url前先使用decode解码
This commit is contained in:
@@ -12,7 +12,7 @@ const permissionWhiteList = [...loginWhiteList, '/entityDetail'] // 权限白名
|
|||||||
|
|
||||||
router.beforeEach(async (to, from, next) => {
|
router.beforeEach(async (to, from, next) => {
|
||||||
if (to.path.indexOf('/login') == -1) {
|
if (to.path.indexOf('/login') == -1) {
|
||||||
sessionStorage.setItem(storageKey.tokenExpireCurrentPath, to.fullPath)
|
sessionStorage.setItem(storageKey.tokenExpireCurrentPath, decodeURIComponent(to.fullPath))
|
||||||
}
|
}
|
||||||
// 加载iso-3166-2资源
|
// 加载iso-3166-2资源
|
||||||
loadGeoData()
|
loadGeoData()
|
||||||
@@ -50,13 +50,13 @@ router.beforeEach(async (to, from, next) => {
|
|||||||
if (hasParam(to.fullPath, 'redirect')) {
|
if (hasParam(to.fullPath, 'redirect')) {
|
||||||
next()
|
next()
|
||||||
} else {
|
} else {
|
||||||
next({ path: '/login', query: { redirect: tokenExpireCurrentPath } })
|
next({ path: '/login', query: { redirect: decodeURIComponent(tokenExpireCurrentPath) } })
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
next()
|
next()
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
next({ path: '/login', query: { redirect: to.fullPath } })
|
next({ path: '/login', query: { redirect: decodeURIComponent(to.fullPath) } })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user