|
@@ -286,7 +286,7 @@ router.beforeEach((to, from, next) => {
|
|
|
if (!store.state.userInfo && to.path !== '/login') {
|
|
if (!store.state.userInfo && to.path !== '/login') {
|
|
|
axios.get('/userInfo/getUserInfo').then(res => {
|
|
axios.get('/userInfo/getUserInfo').then(res => {
|
|
|
if (res.status === 200) {
|
|
if (res.status === 200) {
|
|
|
- if (res.data.success) {
|
|
|
|
|
|
|
+ if (res.data.success && res.data.data) {
|
|
|
store.commit('updateUserInfo', res.data.data);
|
|
store.commit('updateUserInfo', res.data.data);
|
|
|
next();
|
|
next();
|
|
|
return;
|
|
return;
|