Commit c4d06708 authored by Bill's avatar Bill

Merge branch 'fix-v2-220418' into 'v2-220418'

fix: 修复消息列表点击没有跳转的问题 See merge request linkseeks-design/pro-platform!515
parents 9d35d37c 28a8c795
......@@ -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}
/>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment