|
@@ -13,9 +13,10 @@ const whiteList = ['/login', '/register', '/test01', '/ehrentrance', '/contractB
|
|
|
'/foodScreen', '/business/wms/historical-route', '/business/SupAtttachment',
|
|
|
'/business/purchase/form/transferOrder/bipPull-entrance', '/contractDetail',
|
|
|
'/spdAddQuestion', '/business/wms/ProductMarking',
|
|
|
- '/after-sales/index', '/after-sales/login', '/after-sales/feedback', '/after-sales/progress', '/after-sales/updateInfo'
|
|
|
]
|
|
|
|
|
|
+const whiteListName = ['asLogin', "afterSales", "Feedback", "Progress", "UpdateInfo"]
|
|
|
+
|
|
|
router.beforeEach((to, from, next) => {
|
|
|
NProgress.start()
|
|
|
if (getToken()) {
|
|
@@ -47,7 +48,7 @@ router.beforeEach((to, from, next) => {
|
|
|
}
|
|
|
} else {
|
|
|
// 没有token
|
|
|
- if (whiteList.indexOf(to.path) !== -1) {
|
|
|
+ if (whiteList.indexOf(to.path) !== -1 || whiteListName.indexOf(to.name) !== -1) {
|
|
|
// 在免登录白名单,直接进入
|
|
|
next()
|
|
|
} else {
|