From 5a63792ae2dfdd7f6cc7278f8c0d378dfaccf6c8 Mon Sep 17 00:00:00 2001 From: Xia Zekun Date: Thu, 30 May 2024 14:49:39 +0800 Subject: [PATCH] =?UTF-8?q?=E9=92=89=E9=92=89=E5=8D=95=E7=82=B9=E8=B7=B3?= =?UTF-8?q?=E8=BD=AC=E6=90=9C=E7=B4=A2=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (cherry picked from commit 1c32586cdf96ba0433a9b4b79796265ef95a17d3) --- src/common/lang/en-us.js | 3 ++- src/common/lang/zh-cn.js | 3 ++- src/main.js | 4 ++++ src/router/index.js | 10 ++++++++++ src/store/modules/user.js | 1 + src/views/search/generalSearch.vue | 13 +++++++++++++ src/views/user/Login.vue | 7 ++++--- 7 files changed, 36 insertions(+), 5 deletions(-) create mode 100644 src/views/search/generalSearch.vue diff --git a/src/common/lang/en-us.js b/src/common/lang/en-us.js index b8f8219..3c29402 100644 --- a/src/common/lang/en-us.js +++ b/src/common/lang/en-us.js @@ -1,7 +1,8 @@ module.exports = { pageTitle: { home: 'home', - myTodo: 'My To Do' + myTodo: 'My To Do', + search: 'search' }, back: 'back', chinese: 'chinese', diff --git a/src/common/lang/zh-cn.js b/src/common/lang/zh-cn.js index eb33b42..5031678 100644 --- a/src/common/lang/zh-cn.js +++ b/src/common/lang/zh-cn.js @@ -1,7 +1,8 @@ module.exports = { pageTitle: { home: '首页', - myTodo: '我的待办' + myTodo: '我的待办', + search: '标准检索' }, back: '返回', chinese: '中', diff --git a/src/main.js b/src/main.js index 07ac27f..dce9858 100644 --- a/src/main.js +++ b/src/main.js @@ -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) diff --git a/src/router/index.js b/src/router/index.js index 2d0b486..a9a8d3d 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -14,6 +14,16 @@ const routes = [ hasNavBar: true } }, + { + path: '/search/generalSearch', + name: 'search', + component: () => import('@/views/search/generalSearch'), + meta: { + hasNavBar: true, + pageTitle: 'search', + hasBack: true + } + }, { path: '/', // name: 'home', diff --git a/src/store/modules/user.js b/src/store/modules/user.js index 86764a8..443a6bc 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -178,6 +178,7 @@ const user = { commit('SET_INFO', userInfo) commit('SET_NAME', { username: userInfo.username, realname: userInfo.realname, welcome: welcome() }) commit('SET_AVATAR', userInfo.avatar) + resolve(response) } else { reject(response) diff --git a/src/views/search/generalSearch.vue b/src/views/search/generalSearch.vue new file mode 100644 index 0000000..ca473bf --- /dev/null +++ b/src/views/search/generalSearch.vue @@ -0,0 +1,13 @@ + + + + + diff --git a/src/views/user/Login.vue b/src/views/user/Login.vue index 8571137..52d6adb 100644 --- a/src/views/user/Login.vue +++ b/src/views/user/Login.vue @@ -1,8 +1,8 @@