From ee09baf2acf5297c0436b1afbc8c7a6230c974c8 Mon Sep 17 00:00:00 2001 From: Xia Zekun Date: Tue, 4 Jun 2024 15:59:33 +0800 Subject: [PATCH] =?UTF-8?q?=E7=9B=B4=E6=8E=A5=E8=B7=B3=E8=BD=AC=E6=90=9C?= =?UTF-8?q?=E7=B4=A2=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (cherry picked from commit 026b79be04f9f21cadcf93241def8580e4669150) --- src/main.js | 11 +++++++---- src/store/modules/user.js | 4 ---- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/main.js b/src/main.js index 35e3de5..08074c6 100644 --- a/src/main.js +++ b/src/main.js @@ -82,11 +82,14 @@ new Vue({ console.log(' 非钉钉平台 不进行钉钉单点登录') return } - this.$router.push({ path: '/search/generalSearch' }).catch((res) => { - console.log(res) - }) + // this.$router.push({ path: '/search/generalSearch' }).catch((res) => { + // console.log(res) + // }) console.log('store.dispatch(\'DingLogin\')') - store.dispatch('DingLogin').then().catch((e) => { + store.dispatch('DingLogin').then(() => { + console.log('跳转到搜索页') + new Vue().$router.push({ path: '/search/generalSearch' }) + }).catch((e) => { Toast(e.message) }) } diff --git a/src/store/modules/user.js b/src/store/modules/user.js index b6990d3..86764a8 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -178,10 +178,6 @@ const user = { commit('SET_INFO', userInfo) commit('SET_NAME', { username: userInfo.username, realname: userInfo.realname, welcome: welcome() }) commit('SET_AVATAR', userInfo.avatar) - // 跳转 - new Vue().$router.push({ path: '/search/generalSearch' }).catch((res) => { - console.log(res) - }) resolve(response) } else { reject(response)