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
3f12471a
Commit
3f12471a
authored
Sep 28, 2022
by
李腾
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 首页添加权限控制
parent
eeb906ed
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
88 additions
and
56 deletions
+88
-56
index.jsx
src/pages/Admin/index.jsx
+88
-56
No files found.
src/pages/Admin/index.jsx
View file @
3f12471a
...
...
@@ -6,10 +6,18 @@ import { Link } from 'umi';
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
'
;
const
Admin
=
()
=>
{
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
];
useEffect
(()
=>
{
const
qurey
=
async
()
=>
{
const
{
data
}
=
await
getPendingNum
();
...
...
@@ -28,12 +36,19 @@ const Admin = () => {
</
div
>
<
div
style=
{
{
marginTop
:
'
20px
'
}
}
>
<
Row
className=
{
style
.
orderContent
}
>
{
showPendingDeliveryOrderList
||
showCancelBillList
?
(
<
Col
span=
{
2
}
className=
"titleOne"
>
<
div
>
<
FileTextOutlined
/>
<
p
>
订单
</
p
>
</
div
>
</
Col
>
)
:
(
''
)
}
{
showPendingDeliveryOrderList
?
(
<>
<
Col
span=
{
2
}
>
<
Link
to=
{
{
...
...
@@ -55,6 +70,11 @@ const Admin = () => {
<
p
>
超时发货
{
'
>
'
}
48小时
</
p
>
</
Link
>
</
Col
>
</>
)
:
(
''
)
}
{
showCancelBillList
?
(
<
Col
span=
{
4
}
>
<
Link
to=
{
{
...
...
@@ -65,12 +85,18 @@ const Admin = () => {
<
p
>
取消订单审核
{
'
<
'
}
24小时
</
p
>
</
Link
>
</
Col
>
)
:
(
''
)
}
{
showAfterSaleList
?
(
<>
<
Col
span=
{
2
}
className=
"titleTwo"
offset=
{
4
}
>
<
div
>
<
FileTextOutlined
/>
<
p
>
售后
</
p
>
</
div
>
</
Col
>
<
Col
span=
{
3
}
>
<
Link
to=
{
{
...
...
@@ -81,10 +107,16 @@ const Admin = () => {
<
p
>
退款待审核
{
'
<
'
}
24小时
</
p
>
</
Link
>
</
Col
>
</>
)
:
(
''
)
}
</
Row
>
</
div
>
</
div
>
</
div
>
);
};
export
default
Admin
;
export
default
connect
(({
menu
})
=>
({
permissions
:
menu
.
permissions
,
}))(
Admin
);
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