Commit 5e1f254f authored by Bill's avatar Bill

修改消息bug

parent 4febc025
......@@ -36,7 +36,7 @@ const Message: React.FC<{}> = () => {
}
const handleRead = (id, url: string) => {
PublicApi.getReportMessagePlatformRead({id: id})
PublicApi.postReportMessagePlatformRead({id: id})
.then((data) => {
if(url) {
if(/http/.test(url)) {
......@@ -51,6 +51,14 @@ const Message: React.FC<{}> = () => {
}
})
}
const handleAllMessageRead = () => {
PublicApi.postReportMessagePlatformReadAll()
.then(({code, data}) => {
if(code === 1000) {
getList(pagination);
}
})
}
const renderMessage = (data) => {
return (
......@@ -70,7 +78,7 @@ const Message: React.FC<{}> = () => {
<Card>
<div className={styles.header}>
<Button type="primary" icon={<PlusOutlined />} onClick={()=>history.push('/message/messageList/add')} >新建</Button>
<Button type="link" >全部已读</Button>
<Button type="link" onClick={handleAllMessageRead}>全部已读</Button>
</div>
<List
itemLayout="horizontal"
......
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