[update 单点登录] 测试飞书单点登录

This commit is contained in:
danshihao
2024-07-22 14:48:38 +08:00
parent f44b65e0e4
commit 6f8191bee8
3 changed files with 41 additions and 1 deletions
+6
View File
@@ -92,6 +92,12 @@ function main () {
store.commit('TOGGLE_COLOR', Vue.ls.get(DEFAULT_COLOR, config.primaryColor))
store.commit('SET_TOKEN', Vue.ls.get(ACCESS_TOKEN))
store.commit('SET_MULTI_PAGE', Vue.ls.get(DEFAULT_MULTI_PAGE, config.multipage))
// 如果没有登录,state是飞书,并且有code,就请求飞书单点登录
if (!Vue.ls.get(ACCESS_TOKEN) && this.$route.query.code && this.$route.query.state === 'feishu') {
store.dispatch('FeiShuLogin').catch((e) => {
this.$message.warn(e.message)
})
}
},
render: h => h(App),
data: {