Skip to content

Commit 11fdd96

Browse files
author
QM303176530
committed
修改前端用户信息修改位置,防止报错
1 parent 2fdb014 commit 11fdd96

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

web/src/store/module/user.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ export const user = {
3737
actions: {
3838
async LoginIn({ commit }, loginInfo) {
3939
const res = await login(loginInfo)
40-
commit('setUserInfo', res.data.user)
41-
commit('setToken', res.data.token)
4240
if (res.code == 0) {
41+
commit('setUserInfo', res.data.user)
42+
commit('setToken', res.data.token)
4343
const redirect = router.history.current.query.redirect
4444
if (redirect) {
4545
router.push({ path: redirect })

0 commit comments

Comments
 (0)