This commit is contained in:
dengxin
2024-03-19 17:19:44 +08:00
parent 723210a121
commit ef6c744d41
13 changed files with 2765 additions and 209 deletions

View File

@@ -49,35 +49,35 @@ const news = {
state: {
count: 0,
data: {
// "0": {
// id: "0",
// title: "消息通知",
// icon: "../../static/img/notice.svg",
// page: {
// current: 0,
// size,
// total: size
// },
// data: [],
// prop: {
// title: 'title',
// desc: (value) => {
// if (value.data[0])
// return value.data[0][0]['desc']
// },
// time: 'createTime',
// isRead: 'isRead',
// listDesc: 'desc',
// },
// navigateTo(item) {
// uni.$once('getNewsDetail', (cb) => {
// cb(item)
// })
// uni.navigateTo({
// url: "/pages/news/newsDetail?type=0"
// })
// }
// },
"0": {
id: "0",
title: "消息通知",
icon: "../../../static/img/notice.svg",
page: {
current: 0,
size,
total: size
},
data: [],
prop: {
title: 'title',
desc: (value) => {
if (value.data[0])
return value.data[0][0]['desc']
},
time: 'createTime',
isRead: 'isRead',
listDesc: 'desc',
},
navigateTo(item) {
uni.$once('getNewsDetail', (cb) => {
cb(item)
})
uni.navigateTo({
url: "/pages/news/newsDetail?type=0"
})
}
},
"1": {
id: "1",
title: "任务申请",
@@ -141,7 +141,7 @@ const news = {
// "3": {
// id: "1",
// title: "技能推送",
// icon: "../../static/img/jineng.svg",
// icon: "../../../static/img/jineng.svg",
// page: {
// current: 0,
// size,
@@ -315,7 +315,7 @@ const news = {
state.allUnread = getCount(state.unread)
},
CLEAR_NEWS_DATA: (state, id) => {
state.data[id].page = {
state.data[id]?.page = {
current: 0,
size
}