[add]钉钉单点登录前端代码的增加

This commit is contained in:
fengchenchen
2024-03-01 15:29:56 +08:00
parent 5904190722
commit 4ac7edad8a
9 changed files with 112 additions and 23 deletions
+7
View File
@@ -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')