Browse Source

修改前端用户信息修改位置,防止报错

main
QM303176530 4 years ago
parent
commit
1129380c15
  1. 4
      web/src/store/module/user.js

4
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 })

Loading…
Cancel
Save