消息配置
This commit is contained in:
@ -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' });
|
||||
}
|
||||
};
|
||||
|
||||
// 前往通知中心点击
|
||||
|
Reference in New Issue
Block a user