Commit f3965b9d authored by 前端-黄佳鑫's avatar 前端-黄佳鑫
parents 510857d4 a4446dee
......@@ -170,28 +170,31 @@ export function onRouteChange({ routes, matchedRoutes, location, action }) {
if (getAuth()) {
const routeAuthUrls = getRouters()
const { query, pathname } = location
const { pathname } = location
if (userLoginLists.includes(pathname)) {
// 当登录过, 并且尝试访问登录相关页面, 需重定向到首页
history.replace('/memberCenter/home')
return;
}
// 固定配置, 出现此参数说明需携带参数校验权限路由
if (query.page_type && routeAuthUrls.find(authPath => {
const parseUrl = queryString.parseUrl(authPath)
const { query: selfQuery, url } = parseUrl
// 当页面出现参数page_type时, 需进入深度校验, 即对应的参数和路径匹配
return url === pathname && selfQuery.page_type === query.page_type
})) {
// 深度匹配成功, 可正常访问
return;
}
// 去掉page_type参数校验, 无需根据query参数判断权限
// // 固定配置, 出现此参数说明需携带参数校验权限路由
// if (query.page_type && routeAuthUrls.find(authPath => {
// const parseUrl = queryString.parseUrl(authPath)
// const { query: selfQuery, url } = parseUrl
// // 当页面出现参数page_type时, 需进入深度校验, 即对应的参数和路径匹配
// return url === pathname && selfQuery.page_type === query.page_type
// })) {
// // 深度匹配成功, 可正常访问
// return;
// }
// 是否在路由权限列表里
if (routeAuthUrls.includes(pathname)) {
return;
}
// 无权限访问时
console.log(pathname)
history.replace('/memberCenter/noAuth')
} else {
if (whiteLists.includes(location.pathname)) {
......
......@@ -764,7 +764,7 @@ export enum DeliverySideState {
CONFIRM_RETURN_ORDER
}
// 采购订单外部显示文案
// 订单外部显示文案
export const PurchaseOrderOutWorkStateTexts = {
"-1": "取消订单",
1: '待提交订单',
......@@ -786,6 +786,7 @@ export const PurchaseOrderOutWorkStateTexts = {
22: '货品未全部发货'
}
// 采购订单内部
export const PurchaseOrderInsideWorkStateTexts = {
"-1": '取消订单',
1: '待新增采购订单',
......
......@@ -113,7 +113,6 @@ export function timeRange(val: number) {
return { st, et }
}
export const arrayGroupsByCount = (array, count) => {
let index = 0;
let newArray = [];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment