fix(移动端): 手动删除缓存解决未绑定也能从工作台进入DE

This commit is contained in:
fit2cloud-chenyw 2023-02-21 12:43:50 +08:00
parent 3e96b8ee56
commit 203ed10aa3

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()
}