Browse Source

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

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

2
web/src/store/module/user.js

@ -37,9 +37,9 @@ export const user = {
actions: { actions: {
async LoginIn({ commit }, loginInfo) { async LoginIn({ commit }, loginInfo) {
const res = await login(loginInfo) const res = await login(loginInfo)
if (res.code == 0) {
commit('setUserInfo', res.data.user) commit('setUserInfo', res.data.user)
commit('setToken', res.data.token) commit('setToken', res.data.token)
if (res.code == 0) {
const redirect = router.history.current.query.redirect const redirect = router.history.current.query.redirect
if (redirect) { if (redirect) {
router.push({ path: redirect }) router.push({ path: redirect })

Loading…
Cancel
Save