From 1129380c15934e6f8526ee33de1c00ddd98db443 Mon Sep 17 00:00:00 2001 From: QM303176530 <303176530@qq.com> Date: Mon, 14 Sep 2020 20:39:14 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=89=8D=E7=AB=AF=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E4=BF=A1=E6=81=AF=E4=BF=AE=E6=94=B9=E4=BD=8D=E7=BD=AE?= =?UTF-8?q?=EF=BC=8C=E9=98=B2=E6=AD=A2=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/src/store/module/user.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/src/store/module/user.js b/web/src/store/module/user.js index 4af31522..9cb5fa3a 100644 --- a/web/src/store/module/user.js +++ b/web/src/store/module/user.js @@ -37,9 +37,9 @@ export const user = { actions: { async LoginIn({ commit }, loginInfo) { const res = await login(loginInfo) - commit('setUserInfo', res.data.user) - commit('setToken', res.data.token) if (res.code == 0) { + commit('setUserInfo', res.data.user) + commit('setToken', res.data.token) const redirect = router.history.current.query.redirect if (redirect) { router.push({ path: redirect }) -- GitLab