Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
merchant-manage-ui
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
ui
merchant-manage-ui
Commits
31d6d7b0
Commit
31d6d7b0
authored
Jun 26, 2023
by
武广
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修改review代码
parent
77ccf63b
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
8 additions
and
20 deletions
+8
-20
role.config.js
config/role.config.js
+2
-2
BasicLayout.jsx
src/layouts/BasicLayout.jsx
+0
-1
index.jsx
src/pages/Admin/index.jsx
+4
-13
index.jsx
src/pages/GoodsManage/index.jsx
+0
-1
utils.js
src/utils/utils.js
+2
-3
No files found.
config/role.config.js
View file @
31d6d7b0
...
...
@@ -3,8 +3,8 @@
*/
// 从tob进入的判断接口前缀
const
getUrlParams
=
name
=>
{
const
regArg
=
new
RegExp
(
`(^|&)
${
name
}
=([^&]*)(&|$)`
);
const
r
=
window
.
location
.
search
.
substring
(
1
).
match
(
regArg
);
const
regArg
=
RegExp
(
`(^|&)
${
name
}
=([^&]*)(&|$)`
);
const
r
=
regArg
.
exec
(
window
.
location
.
search
.
substring
(
1
)
);
if
(
r
!=
null
)
return
decodeURIComponent
(
r
[
2
]);
return
null
;
};
...
...
src/layouts/BasicLayout.jsx
View file @
31d6d7b0
...
...
@@ -11,7 +11,6 @@ import { connect } from 'dva';
import
{
Icon
as
LegacyIcon
}
from
'
@ant-design/compatible
'
;
import
{
Result
,
Button
,
Layout
,
Menu
}
from
'
antd
'
;
import
Authorized
from
'
@/utils/Authorized
'
;
import
localStorage
from
'
@/utils/localStorage
'
;
import
RightContent
from
'
@/components/GlobalHeader/RightContent
'
;
import
MessageReminder
from
'
@/components/MessageReminder
'
;
import
{
getAuthorityFromRouter
,
getUrlSearchParams
,
getToken
}
from
'
@/utils/utils
'
;
...
...
src/pages/Admin/index.jsx
View file @
31d6d7b0
import
React
,
{
useState
,
useEffect
}
from
'
react
'
;
import
{
Row
,
Col
}
from
'
antd
'
;
import
{
Link
}
from
'
umi
'
;
// import { PageHeaderWrapper } from '@ant-design/pro-layout';
// eslint-disable-next-line import/no-extraneous-dependencies
import
{
FileTextOutlined
}
from
'
@ant-design/icons
'
;
import
style
from
'
./styles.less
'
;
import
{
getPendingNum
}
from
'
./service
'
;
import
{
connect
}
from
'
dva
'
;
import
{
AFTER_SALE_ORDER
,
CANCEL_BILL_MANAGE
,
PENDING_DELIVERY_ORDER
,
}
from
'
@/../config/permission.config
'
;
import
{
AFTER_SALE_ORDER
,
PENDING_DELIVERY_ORDER
}
from
'
@/../config/permission.config
'
;
const
Admin
=
props
=>
{
const
[
pendingNum
,
setPendingNum
]
=
useState
({});
const
showAfterSaleList
=
props
.
permissions
[
AFTER_SALE_ORDER
.
LIST
];
const
showCancelBillList
=
props
.
permissions
[
CANCEL_BILL_MANAGE
.
LIST
];
const
showPendingDeliveryOrderList
=
props
.
permissions
[
PENDING_DELIVERY_ORDER
.
LIST
];
const
qu
re
y
=
async
()
=>
{
const
qu
er
y
=
async
()
=>
{
const
res
=
await
getPendingNum
();
if
(
res
&&
res
.
data
)
{
setPendingNum
(
res
.
data
);
}
setPendingNum
(
res
?.
data
||
{});
};
useEffect
(()
=>
{
qu
re
y
();
qu
er
y
();
},
[]);
return
(
...
...
src/pages/GoodsManage/index.jsx
View file @
31d6d7b0
...
...
@@ -4,7 +4,6 @@ import { Card, Pagination, Table, notification, Drawer, Spin, Button, Modal } fr
import
React
,
{
Component
}
from
'
react
'
;
import
{
PageHeaderWrapper
}
from
'
@ant-design/pro-layout
'
;
import
{
connect
}
from
'
dva
'
;
import
{
getToken
}
from
'
@/utils/utils
'
;
import
styles
from
'
./style.less
'
;
import
UpdateStock
from
'
./UpdateStock
'
;
...
...
src/utils/utils.js
View file @
31d6d7b0
...
...
@@ -3,7 +3,6 @@ import { parse } from 'querystring';
import
pathRegexp
from
'
path-to-regexp
'
;
import
moment
from
'
moment
'
;
import
localStorage
from
'
./localStorage
'
;
import
config
from
'
@/../config/env.config
'
;
/* eslint no-useless-escape:0 import/prefer-default-export:0 */
const
reg
=
/
(((
^https
?
:
(?:\/\/)?)(?:[
-;:&=
\+\$
,
\w]
+@
)?[
A-Za-z0-9.-
]
+
(?:
:
\d
+
)?
|
(?:
www.|
[
-;:&=
\+\$
,
\w]
+@
)[
A-Za-z0-9.-
]
+
)((?:\/[\+
~%
\/
.
\w
-_
]
*
)?\??(?:[
-
\+
=&;%@.
\w
_
]
*
)
#
?(?:[\w]
*
))?)
$/
;
...
...
@@ -183,8 +182,8 @@ export const getErrorMessage = err => {
// 获取地址栏参数,name:参数名称
export
const
getUrlParams
=
name
=>
{
const
regArg
=
new
RegExp
(
`(^|&)
${
name
}
=([^&]*)(&|$)`
);
const
r
=
window
.
location
.
search
.
substring
(
1
).
match
(
regArg
);
const
regArg
=
RegExp
(
`(^|&)
${
name
}
=([^&]*)(&|$)`
);
const
r
=
regArg
.
exec
(
window
.
location
.
search
.
substring
(
1
)
);
if
(
r
!=
null
)
return
decodeURIComponent
(
r
[
2
]);
return
null
;
};
...
...
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