[add]钉钉单点登录前端代码的增加
This commit is contained in:
@@ -65,6 +65,13 @@ new Vue({
|
||||
mounted () {
|
||||
store.commit('SET_TOKEN', Vue.ls.get(ACCESS_TOKEN))
|
||||
store.commit('SET_INFO', Vue.ls.get(USER_INFO))
|
||||
// 判断是否有token,没有的话就直接单点登录
|
||||
if (!Vue.ls.get(ACCESS_TOKEN)) {
|
||||
console.log('store.dispatch(\'DingLogin\')')
|
||||
store.dispatch('DingLogin').catch((e) => {
|
||||
Toast(e.message)
|
||||
})
|
||||
}
|
||||
},
|
||||
render: h => h(App)
|
||||
}).$mount('#app')
|
||||
|
||||
Reference in New Issue
Block a user