From 915cf06bec783890c331b0bb4fd19c01d8015fe6 Mon Sep 17 00:00:00 2001 From: smallchill Date: Thu, 24 Mar 2022 02:22:32 +0800 Subject: [PATCH] =?UTF-8?q?:zap:=20=E4=BC=98=E5=8C=96=E9=83=A8=E9=97=A8?= =?UTF-8?q?=E5=88=87=E6=8D=A2=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/page/index/top/index.vue | 1 + src/store/modules/user.js | 1 + 2 files changed, 2 insertions(+) diff --git a/src/page/index/top/index.vue b/src/page/index/top/index.vue index c7253c6..6b99b79 100644 --- a/src/page/index/top/index.vue +++ b/src/page/index/top/index.vue @@ -232,6 +232,7 @@ submitSwitch (form, done) { this.$store.dispatch("refreshToken", form).then(() => { this.userBox = false; + this.$router.push({path: "/"}); }) done(); }, diff --git a/src/store/modules/user.js b/src/store/modules/user.js index 6a7989c..5fe9fd0 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -125,6 +125,7 @@ const user = { const data = res.data; commit('SET_TOKEN', data.access_token); commit('SET_REFRESH_TOKEN', data.refresh_token); + commit('SET_USER_INFO', data); resolve(); }).catch(error => { reject(error)