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)