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
shenshaokai
jinfa-platform
Commits
c4d06708
Commit
c4d06708
authored
Apr 22, 2022
by
Bill
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'fix-v2-220418' into 'v2-220418'
fix: 修复消息列表点击没有跳转的问题 See merge request linkseeks-design/pro-platform!515
parents
9d35d37c
28a8c795
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
18 deletions
+18
-18
index.tsx
src/pages/srmHome/components/MessageList/index.tsx
+18
-18
No files found.
src/pages/srmHome/components/MessageList/index.tsx
View file @
c4d06708
...
...
@@ -3,7 +3,7 @@
*/
import
React
,
{
useEffect
,
useState
}
from
'react'
;
import
{
history
}
from
'umi'
;
import
{
List
,
Space
,
Button
,
Spin
}
from
'antd'
;
import
{
List
,
Space
,
Button
,
Spin
,
Tooltip
}
from
'antd'
;
import
{
LeftOutlined
,
RightOutlined
}
from
'@ant-design/icons'
;
import
moment
from
'moment'
;
import
{
getMessageMessageMemberPage
,
GetMessageMessageMemberPageResponseDetail
,
postMessageMessageMemberRead
}
from
'@/services/MessageV2Api'
;
...
...
@@ -75,18 +75,16 @@ const TodoCard: React.FC = () => {
if
(
code
!==
1000
)
{
return
;
}
if
(
AuthUrl
(
'message.see'
))
{
if
(
url
)
{
if
(
/http/
.
test
(
url
))
{
location
.
href
=
url
;
}
else
{
history
.
push
(
url
);
}
if
(
url
)
{
if
(
/http/
.
test
(
url
))
{
location
.
href
=
url
;
}
else
{
fetchMsgList
().
then
((
res
)
=>
{
setList
(
res
);
}).
catch
(()
=>
{});
history
.
push
(
url
);
}
}
else
{
fetchMsgList
().
then
((
res
)
=>
{
setList
(
res
);
}).
catch
(()
=>
{});
}
}
...
...
@@ -114,14 +112,16 @@ const TodoCard: React.FC = () => {
itemLayout=
"horizontal"
dataSource=
{
list
}
renderItem=
{
(
item
)
=>
(
<
div
className=
{
styles
[
'message-item'
]
}
onClick=
{
()
=>
handleRead
(
item
.
id
,
item
.
url
)
}
>
<
div
className=
{
styles
[
'message-item-content'
]
}
>
{
item
.
content
}
</
div
>
<
div
className=
{
styles
[
'message-item-date'
]
}
>
{
moment
(
item
.
sendTime
).
format
(
'YYYY-MM-DD HH:mm'
)
}
<
Tooltip
title=
{
item
.
content
}
>
<
div
className=
{
styles
[
'message-item'
]
}
onClick=
{
()
=>
handleRead
(
item
.
id
,
item
.
url
)
}
>
<
div
className=
{
styles
[
'message-item-content'
]
}
>
{
item
.
content
}
</
div
>
<
div
className=
{
styles
[
'message-item-date'
]
}
>
{
moment
(
item
.
sendTime
).
format
(
'YYYY-MM-DD HH:mm'
)
}
</
div
>
</
div
>
</
div
>
</
Tooltip
>
)
}
bordered=
{
false
}
/>
...
...
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