Commit ca9331c8 by hank

bug

parent 24163a11
...@@ -45,15 +45,17 @@ export default { ...@@ -45,15 +45,17 @@ export default {
// 请求入围信息,提前加载入围的信息防止入围公告闪烁 // 请求入围信息,提前加载入围的信息防止入围公告闪烁
// store.commit('getRuweiInfo'); // store.commit('getRuweiInfo');
if(localStorage.getItem('token') || this.getQuery('token')) { if(localStorage.getItem('token') || this.getQuery('token') ) {
if (this.getQuery('token')) { if (this.getQuery('token')) {
store.commit('setToken', this.getQuery('token')) store.commit('setToken', this.getQuery('token'))
} }
store.commit('getUserInfo') store.commit('getUserInfo')
} else { } else {
if(!this.getQuery('code') && !store.state.token) {
store.dispatch('getAuth') store.dispatch('getAuth')
} }
}
}, },
mounted() { mounted() {
var tar_userinfo = localStorage.getItem('tar_userinfo'); var tar_userinfo = localStorage.getItem('tar_userinfo');
......
...@@ -49,8 +49,10 @@ export default { ...@@ -49,8 +49,10 @@ export default {
} }
store.commit('getUserInfo') store.commit('getUserInfo')
} else { } else {
if(!this.getQuery('code') && !store.state.token) {
store.dispatch('getAuth') store.dispatch('getAuth')
} }
}
this.judgeShare() this.judgeShare()
this.getActiveInfo() this.getActiveInfo()
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment