钉钉单点跳转搜索页面

(cherry picked from commit 1c32586cdf96ba0433a9b4b79796265ef95a17d3)
This commit is contained in:
Xia Zekun
2024-09-06 17:24:14 +08:00
committed by mzaxd
parent 9feec6a60f
commit 5a63792ae2
7 changed files with 36 additions and 5 deletions
+4
View File
@@ -23,6 +23,7 @@ import 'viewerjs/dist/viewer.css'
// 引入 VConsole
import VConsole from 'vconsole'
import * as dd from 'dingtalk-jsapi'
Vue.config.productionTip = false
@@ -74,6 +75,9 @@ new Vue({
store.commit('SET_INFO', Vue.ls.get(USER_INFO))
// 判断是否有token,没有的话就直接单点登录
if (!Vue.ls.get(ACCESS_TOKEN)) {
// 非钉钉平台 不进行钉钉单点登录
if (dd.env.platform === 'notInDingTalk') return
console.log('store.dispatch(\'DingLogin\')')
store.dispatch('DingLogin').catch((e) => {
Toast(e.message)