Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jinfa-admin
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
shenshaokai
jinfa-admin
Commits
279b6785
Commit
279b6785
authored
Oct 26, 2020
by
XieZhiXiong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixbug
parent
b215bcda
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
20 deletions
+20
-20
index.tsx
src/pages/comment/manage/detailed/index.tsx
+18
-18
index.tsx
src/pages/comment/manage/index.tsx
+1
-1
index.tsx
src/pages/comment/query/index.tsx
+1
-1
No files found.
src/pages/comment/manage/detailed/index.tsx
View file @
279b6785
...
...
@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-09-23 11:02:03
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-10-2
1 15:19:00
* @LastEditTime: 2020-10-2
6 09:52:13
* @Description:
*/
import
React
,
{
useState
,
useEffect
}
from
'react'
;
...
...
@@ -31,28 +31,28 @@ import styles from './evaluate.less';
const
formActions
=
createFormActions
();
interface
OrderInfo
{
// 下单时间
created
:
string
;
// 订单号
orderNo
:
string
;
};
const
CommentManageDetailed
:
React
.
FC
=
()
=>
{
const
{
id
,
orderId
}
=
usePageStatus
();
const
[
orderInfo
,
setOrderInfo
]
=
useState
<
GetOrderPlatformOrderDetailsResponse
>
();
const
[
orderInfoLoading
,
setOrderInfoLoading
]
=
useState
(
false
);
const
[
orderInfo
,
setOrderInfo
]
=
useState
<
OrderInfo
>
();
const
[
commentInfo
,
setCommentInfo
]
=
useState
<
Unevaluated
[]
>
([]);
const
[
commentInfoLoading
,
setCommentInfoLoading
]
=
useState
(
false
);
// 获取订单详情
const
getOrderInfo
=
()
=>
{
if
(
!
orderId
||
orderId
===
'undefined'
)
{
const
getOrderInfo
=
(
data
)
=>
{
if
(
!
data
||
!
data
.
id
)
{
return
;
}
setOrderInfoLoading
(
true
);
PublicApi
.
getOrderPlatformOrderDetails
({
id
:
orderId
,
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
setOrderInfo
(
res
.
data
);
}
}).
finally
(()
=>
{
setOrderInfoLoading
(
false
);
});
return
{
created
:
data
.
dealTime
,
orderNo
:
data
.
remark
,
};
};
// 获取评论详情
...
...
@@ -66,6 +66,7 @@ const CommentManageDetailed: React.FC = () => {
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
setCommentInfo
(
normalizeUnevaluatedList
([
res
.
data
]));
setOrderInfo
(
getOrderInfo
(
res
.
data
));
}
}).
finally
(()
=>
{
setCommentInfoLoading
(
false
);
...
...
@@ -73,7 +74,6 @@ const CommentManageDetailed: React.FC = () => {
};
useEffect
(()
=>
{
getOrderInfo
();
getCommentInfo
();
},
[]);
...
...
@@ -100,7 +100,7 @@ const CommentManageDetailed: React.FC = () => {
);
return
(
<
Spin
spinning=
{
commentInfoLoading
||
orderInfoLoading
}
>
<
Spin
spinning=
{
commentInfoLoading
}
>
<
PageHeaderWrapper
title=
{
<>
...
...
@@ -123,7 +123,7 @@ const CommentManageDetailed: React.FC = () => {
padding
:
'0 32px'
,
}
}
>
<
Descriptions
.
Item
label=
"下单时间"
span=
{
2
}
>
{
orderInfo
?.
create
Time
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"下单时间"
span=
{
2
}
>
{
orderInfo
?.
create
d
}
</
Descriptions
.
Item
>
</
Descriptions
>
</
PageHeader
>
</>
...
...
src/pages/comment/manage/index.tsx
View file @
279b6785
...
...
@@ -50,7 +50,7 @@ const CommentManage: React.FC = () => {
align
:
'center'
,
render
:
(
text
,
record
)
=>
(
<
EyePreview
url=
{
`/comment/manage/detail?
orderId=${record.orderId}&
id=${record.id}`
}
url=
{
`/comment/manage/detail?id=${record.id}`
}
>
{
text
}
</
EyePreview
>
...
...
src/pages/comment/query/index.tsx
View file @
279b6785
...
...
@@ -31,7 +31,7 @@ const CommentQuery = () => {
align
:
'center'
,
render
:
(
text
,
record
)
=>
(
<
EyePreview
url=
{
`/comment/query/detail`
}
url=
{
`/comment/query/detail
?memberId=${record.memberId}&roleId=${record.roleId}
`
}
>
{
text
}
</
EyePreview
>
...
...
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