fix: 消息通知点击已读,提示消息为清空 fix #467
This commit is contained in:
parent
dd38283c91
commit
91e734b094
@ -16,12 +16,20 @@ export const Notifications = () => {
|
||||
url: `/system_notifications:get`,
|
||||
});
|
||||
const getNotificationList = data?.data || [];
|
||||
const { run: updateRead } = useRequest<{ data: any }>({
|
||||
url: `/system_notifications:update`,
|
||||
params: {
|
||||
ids: getNotificationList.map((item) => item.id),
|
||||
const { run: updateRead } = useRequest<{ data: any }>(
|
||||
{
|
||||
url: `/system_notifications:update`,
|
||||
params: {
|
||||
ids: getNotificationList.map((item) => item.id),
|
||||
},
|
||||
},
|
||||
});
|
||||
{
|
||||
onSuccess() {
|
||||
run();
|
||||
message.info('成功');
|
||||
},
|
||||
},
|
||||
);
|
||||
const content = (
|
||||
<List
|
||||
style={{ width: '400px' }}
|
||||
@ -33,8 +41,6 @@ export const Notifications = () => {
|
||||
block
|
||||
onClick={() => {
|
||||
updateRead();
|
||||
run();
|
||||
message.info('成功');
|
||||
}}
|
||||
>
|
||||
全部已读
|
||||
|
Loading…
Reference in New Issue
Block a user