消息配置

This commit is contained in:
Teo
2025-08-14 10:50:56 +08:00
parent f6c21bf195
commit 062fa5b080
6 changed files with 108 additions and 221 deletions

View File

@ -26,6 +26,9 @@
import { storeToRefs } from 'pinia';
import useNoticeStore from '@/store/modules/notice';
const router = useRouter();
const { proxy } = getCurrentInstance();
const noticeStore = storeToRefs(useNoticeStore());
const { readAll } = useNoticeStore();
@ -50,6 +53,11 @@ const onNewsClick = (item: any) => {
newsList.value[item].read = true;
//并且写入pinia
noticeStore.state.value.notices = newsList.value;
//如果有formPath就前往
console.log('🚀 ~ onNewsClick ~ item.formPath:', item.formPath, newsList.value);
if (newsList.value[item].formPath) {
proxy?.$tab.openPage('/' + newsList.value[item].formPath, '', { id: newsList.value[item].businessId, type: 'view' });
}
};
// 前往通知中心点击