This commit is contained in:
qsh
2024-09-12 09:45:33 +08:00
parent 842e6ea24b
commit 187c156e88
5 changed files with 49 additions and 7 deletions

View File

@@ -122,7 +122,10 @@ const handleQuery = () => {
getList()
}
function handleDetail(row: any) {
async function handleDetail(row: any) {
if (!row.readStatus) {
await handleReadOne(row.id)
}
const url = router.resolve({
path: '/nm-detail',
query: { id: row.id }
@@ -133,6 +136,14 @@ function handleDetail(row: any) {
const tableRef = ref() // 表格的 Ref
const selectedIds = ref<number[]>([]) // 表格的选中 ID 数组
/** 标记一条站内信已读 */
const handleReadOne = async (id: number) => {
await NotifyMessageApi.updateNotifyMessageRead({
ids: [id]
})
await getList()
}
/** 标记全部站内信已读 **/
const handleUpdateAll = async () => {
await NotifyMessageApi.updateAllNotifyMessageRead({