Merge branch 'feature/task1.0.0' into 'msb_test'

Feature/task1.0.0

See merge request yanxuan-frontend/shop-pc!73
merge-requests/75/merge
肖广 3 years ago
commit de75b1bbaa

@ -1,21 +1,13 @@
export default ({ app }) => { export default ({ app }) => {
app.router.beforeEach((to, from, next) => { app.router.beforeEach((to, from, next) => {
// const { token, userInfo } = app.store.state; const { token, userInfo } = app.store.state;
// if (token) { if (token) {
// if (Object.keys(userInfo).length === 0) { if (Object.keys(userInfo).length === 0) {
// app.store.dispatch("getUserInfo"); app.store.dispatch("getUserInfo");
// } }
// next(); next();
// return; return;
// } }
// // 未登录打开需要登录的页面,跳首页
// const needLoginPage = [/\/account/, /\/cart/];
// const result = needLoginPage.some((item) => item.test(to.path));
// if (result) {
// next("/");
// return;
// }
next(); next();
}); });
}; };

Loading…
Cancel
Save