From 9c9d121e47423b325e62bfd03b4332ec1e5bdf4d Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期五, 27 三月 2026 16:05:51 +0800
Subject: [PATCH] 军泰伟业 1.已发货数量等于总数量时,状态为已发货。已发货数量小于总数量时,状态建议新增发货中 2.产品清除工艺路线点击确定后,仍然回显绑定的工艺路线 3.新增退货单时,退一部分货后,继续对此退货单进行退货操作,展示数据有误
---
src/permission.js | 14 +++++++++-----
1 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/src/permission.js b/src/permission.js
index 1afe9cd..9bf4a91 100644
--- a/src/permission.js
+++ b/src/permission.js
@@ -3,15 +3,19 @@
import NProgress from 'nprogress'
import 'nprogress/nprogress.css'
import { getToken } from '@/utils/auth'
-import { isHttp } from '@/utils/validate'
+import { isHttp, isPathMatch } from '@/utils/validate'
import { isRelogin } from '@/utils/request'
import useUserStore from '@/store/modules/user'
import useSettingsStore from '@/store/modules/settings'
import usePermissionStore from '@/store/modules/permission'
-NProgress.configure({ showSpinner: false });
+NProgress.configure({ showSpinner: false })
-const whiteList = ['/login', '/register'];
+const whiteList = ['/login', '/register', '/callbacklccpn','/device-info']
+
+const isWhiteList = (path) => {
+ return whiteList.some(pattern => isPathMatch(pattern, path))
+}
router.beforeEach((to, from, next) => {
NProgress.start()
@@ -21,7 +25,7 @@
if (to.path === '/login') {
next({ path: '/' })
NProgress.done()
- } else if (whiteList.indexOf(to.path) !== -1) {
+ } else if (isWhiteList(to.path)) {
next()
} else {
if (useUserStore().roles.length === 0) {
@@ -50,7 +54,7 @@
}
} else {
// 娌℃湁token
- if (whiteList.indexOf(to.path) !== -1) {
+ if (isWhiteList(to.path)) {
// 鍦ㄥ厤鐧诲綍鐧藉悕鍗曪紝鐩存帴杩涘叆
next()
} else {
--
Gitblit v1.9.3