From c8779f87a41ac9e348c4fe4e6f5a79e9ad5be134 Mon Sep 17 00:00:00 2001 From: dingtalk_umvbsp Date: Thu, 2 Mar 2023 11:12:27 +0800 Subject: [PATCH] =?UTF-8?q?=E8=81=94=E8=B0=83=E7=B3=BB=E7=BB=9F=E4=BF=A1?= =?UTF-8?q?=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/home/my.vue | 4 ++ pages/home/news.vue | 127 +++++++++++++++++++++++++++++--------- pages/home/newsDetail.vue | 20 +++--- store/index.js | 11 +++- 4 files changed, 120 insertions(+), 42 deletions(-) diff --git a/pages/home/my.vue b/pages/home/my.vue index 364bcbd..4ca009e 100644 --- a/pages/home/my.vue +++ b/pages/home/my.vue @@ -100,6 +100,10 @@ import {host} from '@/common/request' // uni.setTabBarBadge({ index:2, text:'' })//底部标签显示数字 uni.hideTabBarRedDot({index:2}) }, + onHide(){ + console.log('------my-----onHide---------------') + + }, methods:{ } diff --git a/pages/home/news.vue b/pages/home/news.vue index 6125399..96858a2 100644 --- a/pages/home/news.vue +++ b/pages/home/news.vue @@ -49,15 +49,17 @@ border-radius: 50%; position:relative; margin-right:16rpx; - &:after{ - content:""; - position:absolute; - background:red; - width:12rpx; - height:12rpx; - border-radius: 50%; - top:9rpx; - right:9rpx; + &.noRead{ + &:after{ + content:""; + position:absolute; + background:red; + width:12rpx; + height:12rpx; + border-radius: 50%; + top:9rpx; + right:9rpx; + } } } &>view{ @@ -129,7 +131,6 @@ align-items: center; margin-top:10rpx; .fruit,.food{ - margin-right:16rpx; border-radius: 8rpx; flex-shrink: 0; height:44rpx; @@ -173,6 +174,7 @@ .cause,.date{ color:#999; font-size:24rpx; + margin-left:16rpx; } } } @@ -181,47 +183,112 @@ \ No newline at end of file diff --git a/pages/home/newsDetail.vue b/pages/home/newsDetail.vue index adaea01..3565cb6 100644 --- a/pages/home/newsDetail.vue +++ b/pages/home/newsDetail.vue @@ -27,6 +27,7 @@ border-radius: 24rpx; color:#999; background: #F7F7F7; + width:calc(100% - 60rpx); } } } @@ -45,28 +46,28 @@ @@ -74,12 +75,13 @@ export default { data(){ return{ - + detail:{}, eventChannel:null, } }, onLoad(options){ this.eventChannel=this.getOpenerEventChannel() + this.eventChannel.on("detail",e=>this.detail=e) uni.setNavigationBarTitle({ title:({farming:"农事记录",news:"消息详情"})[options.intoPage] }) diff --git a/store/index.js b/store/index.js index 7de52c5..027fc32 100644 --- a/store/index.js +++ b/store/index.js @@ -1,12 +1,14 @@ import Vue from 'vue' import Vuex from 'vuex' +import request from '@/common/request' Vue.use(Vuex) +var timer=null export default new Vuex.Store({ state:{ userInfo:{}, token:"", - baseInfo:{ + baseInfo:{//地块信息 id:"", name:"", }, @@ -22,6 +24,7 @@ export default new Vuex.Store({ companyName:val.departs[0].departName } state.token=val.token + this.dispatch('getSysMsg') }, outLogin(state){ state.userInfo={} @@ -38,6 +41,8 @@ export default new Vuex.Store({ }, }, actions:{ - + async getSysMsg(a,b,c){ + console.log(a,b,c,'-------ddd---') + }, } -}) \ No newline at end of file +})