|
|
|
@ -109,7 +109,9 @@ const getUser = (first?) => { |
|
|
|
Api.pub.getInfo().then((rsp) => { |
|
|
|
Api.pub.getInfo().then((rsp) => { |
|
|
|
first && (flag.loading = false); |
|
|
|
first && (flag.loading = false); |
|
|
|
if (rsp) { |
|
|
|
if (rsp) { |
|
|
|
commit('updateState', ['user', rsp]); |
|
|
|
if (state.user?.userId !== rsp.userId) { |
|
|
|
|
|
|
|
commit('updateState', ['user', rsp]); |
|
|
|
|
|
|
|
} |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
router.push('/login'); |
|
|
|
router.push('/login'); |
|
|
|
} |
|
|
|
} |
|
|
|
|