Skip to content

Commit d3ad03d

Browse files
committed
修复bug
1 parent c07b204 commit d3ad03d

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/router/router.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,7 @@ const auth = (to, from, next) => {
5656
*/
5757
const whiteList = ['login'];
5858
const authRoutes = async (to, from, next) => {
59-
if (to.name == 'login') {
60-
next();
61-
} else {
59+
if (storage.getItem(authToken)) {
6260
const routes = await store.dispatch('getMenuListApi');
6361
const routesUrlList = routes.map(item => item.index);
6462
if (routesUrlList.includes(to.name) || whiteList.includes(to.name)) {

0 commit comments

Comments
 (0)