Merge pull request #4594 from dataease/pr@dev@fix_mobile_cache

fix(移动端): 手动删除缓存解决未绑定也能从工作台进入DE
This commit is contained in:
fit2cloud-chenyw 2023-02-21 12:45:47 +08:00 committed by GitHub
commit ba866423bd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -57,7 +57,7 @@ const routeBefore = (callBack) => {
callBack()
}
}
router.beforeEach(async(to, from, next) => routeBefore(() => {
router.beforeEach(async (to, from, next) => routeBefore(() => {
// start progress bar
NProgress.start()
const mobileIgnores = ['/delink', '/de-auto-login']
@ -69,6 +69,9 @@ router.beforeEach(async(to, from, next) => routeBefore(() => {
if (hasToken) {
urlSuffix += ('?detoken=' + hasToken)
}
localStorage.removeItem('user-info')
localStorage.removeItem('userId')
localStorage.removeItem('Authorization')
window.location.href = window.origin + urlSuffix
NProgress.done()
}