Commit 42d606af by hank

bug

parent ca9331c8
...@@ -101,6 +101,7 @@ export default new Vuex.Store({ ...@@ -101,6 +101,7 @@ export default new Vuex.Store({
} }
}).then(res => { }).then(res => {
window.localStorage.setItem('callbackurl', location.href) window.localStorage.setItem('callbackurl', location.href)
"认证跳转"
location.replace(res.data.data.url) location.replace(res.data.data.url)
state.isAuth = false state.isAuth = false
}) })
...@@ -119,8 +120,9 @@ export default new Vuex.Store({ ...@@ -119,8 +120,9 @@ export default new Vuex.Store({
state.token = res.data.data.accessToken state.token = res.data.data.accessToken
state.type = res.data.data.type state.type = res.data.data.type
// location.href = res.data.data.url + '/video/2.html' // location.href = res.data.data.url + '/video/2.html'
resolve(res.data.data.accessToken)
commit('getUserInfo') commit('getUserInfo')
resolve(res.data.data.accessToken)
}) })
}) })
} }
......
...@@ -46,7 +46,6 @@ export default { ...@@ -46,7 +46,6 @@ 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'))
} }
......
...@@ -50,6 +50,7 @@ export default { ...@@ -50,6 +50,7 @@ export default {
store.commit('getUserInfo') store.commit('getUserInfo')
} else { } else {
if(!this.getQuery('code') && !store.state.token) { if(!this.getQuery('code') && !store.state.token) {
alert('我掉的认证')
store.dispatch('getAuth') store.dispatch('getAuth')
} }
} }
......
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