测试环境排查
(cherry picked from commit 08b7ad65d4291532a08932d00a8f3623131db56c)
This commit is contained in:
+7
-2
@@ -73,13 +73,18 @@ new Vue({
|
||||
mounted () {
|
||||
store.commit('SET_TOKEN', Vue.ls.get(ACCESS_TOKEN))
|
||||
store.commit('SET_INFO', Vue.ls.get(USER_INFO))
|
||||
console.log('new Vue()')
|
||||
// 判断是否有token,没有的话就直接单点登录
|
||||
if (!Vue.ls.get(ACCESS_TOKEN)) {
|
||||
console.log('无token信息,尝试重新登录')
|
||||
// 非钉钉平台 不进行钉钉单点登录
|
||||
if (dd.env.platform === 'notInDingTalk') return
|
||||
if (dd.env.platform === 'notInDingTalk') {
|
||||
console.log(' 非钉钉平台 不进行钉钉单点登录')
|
||||
return
|
||||
}
|
||||
|
||||
console.log('store.dispatch(\'DingLogin\')')
|
||||
store.dispatch('DingLogin').catch((e) => {
|
||||
store.dispatch('DingLogin').then().catch((e) => {
|
||||
Toast(e.message)
|
||||
})
|
||||
}
|
||||
|
||||
@@ -178,7 +178,10 @@ const user = {
|
||||
commit('SET_INFO', userInfo)
|
||||
commit('SET_NAME', { username: userInfo.username, realname: userInfo.realname, welcome: welcome() })
|
||||
commit('SET_AVATAR', userInfo.avatar)
|
||||
|
||||
// 跳转
|
||||
new Vue().$router.push({ path: '/search/generalSearch' }).catch((res) => {
|
||||
console.log(res)
|
||||
})
|
||||
resolve(response)
|
||||
} else {
|
||||
reject(response)
|
||||
|
||||
Reference in New Issue
Block a user