diff --git a/pages/home/news.vue b/pages/home/news.vue index c01adab..e48d2f4 100644 --- a/pages/home/news.vue +++ b/pages/home/news.vue @@ -104,6 +104,11 @@ color:rgba(var(--c),1); background-color:rgba(var(--c),0.1); padding-right:20rpx; + &.read{ + color:#999; + font-size:24rpx; + margin-left:auto; + } } .germinate{ --c:15, 194, 119; @@ -208,6 +213,7 @@ {{v.growthProcess_dictText}} {{v.pestSite_dictText}} {{v.symptom_dictText}} + 阅读:{{v.readNum}} @@ -274,8 +280,10 @@ export default { async toDetail(index){ var res=await request("/api/message/getById",{params:{id:this.list[index].id}}) if(res.statu){ - this.list[index].readStatus='已读' - this.$store.state.sysMsgNum-=1 + if(this.list[index].readStatus=='未读'){ + this.list[index].readStatus='已读' + this.$store.state.sysMsgNum-=1 + } uni.navigateTo({ url:`/pages/home/newsDetail?intoPage=news`, success(e){