Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jinfa-platform
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linweijiong
jinfa-platform
Commits
f3965b9d
Commit
f3965b9d
authored
Nov 02, 2020
by
前端-黄佳鑫
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of
http://10.0.0.22:3000/lingxi/lingxi-business-paltform
into dev
parents
510857d4
a4446dee
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
14 deletions
+17
-14
app.tsx
src/app.tsx
+15
-12
index.ts
src/constants/index.ts
+2
-1
index.tsx
src/utils/index.tsx
+0
-1
No files found.
src/app.tsx
View file @
f3965b9d
...
...
@@ -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
))
{
...
...
src/constants/index.ts
View file @
f3965b9d
...
...
@@ -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
:
'待新增采购订单'
,
...
...
src/utils/index.tsx
View file @
f3965b9d
...
...
@@ -113,7 +113,6 @@ export function timeRange(val: number) {
return
{
st
,
et
}
}
export
const
arrayGroupsByCount
=
(
array
,
count
)
=>
{
let
index
=
0
;
let
newArray
=
[];
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment