This commit is contained in:
zhangyichen
2022-04-25 09:53:13 +08:00
parent f93bc30d5a
commit cf4ca56254
2 changed files with 7 additions and 0 deletions
+6
View File
@@ -189,6 +189,12 @@ router.beforeEach(function (to, from, next) {
}
}
} else {
if ((token === null || token === '' ) && toName === 'OtherStandardDetails') {
if (localStorage.getItem('hrefToken')) {
next()
return
}
}
if ((token === null || token === '' ) && toName !== 'Login') {
if(webLoginType != null && webLoginType === 'idm' ){
if(code){
+1
View File
@@ -156,6 +156,7 @@
let userInfoStr = Base64.decode(res.data)
let userInfo2 = decodeURIComponent(userInfoStr)
let userInfoObj = JSON.parse(userInfo2)
localStorage.setItem('hrefToken', userInfoObj.token)
userInfoObj.userId = userInfoObj.usid
window.sessionStorage.setItem('userInfoObj', userInfoObj); // del
this.setToken(userInfoObj.token) // vuex存储token