From 52fd1e0524c613623cde2cc453d85e8c24b47831 Mon Sep 17 00:00:00 2001 From: slj Date: Tue, 23 Nov 2021 17:15:38 +0800 Subject: [PATCH] =?UTF-8?q?bug=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/topics/activity/cell/index.js | 1 - pages/topics/activity/cell/index.wxml | 2 +- pages/topics/activity/cell/index.wxss | 12 ++++++++---- pages/topics/activity/index.js | 8 +++++--- pages/topics/activity/index.wxml | 5 ++++- pages/topics/attract/ocean/index.js | 2 +- pages/topics/index.js | 15 ++++++++++++--- pages/topics/index.wxml | 2 +- pages/topics/lease/index.wxss | 2 ++ pages/user/index.js | 2 +- 10 files changed, 35 insertions(+), 16 deletions(-) diff --git a/pages/topics/activity/cell/index.js b/pages/topics/activity/cell/index.js index 286bdfb..46626f2 100644 --- a/pages/topics/activity/cell/index.js +++ b/pages/topics/activity/cell/index.js @@ -29,7 +29,6 @@ Component({ onTap() { this.triggerEvent('clickListItem', { activityId: this.properties.activityId }) }, - touchstart: function (e) { let {nickName} = store.readUserInfo() if (e.currentTarget.dataset.name === nickName) { diff --git a/pages/topics/activity/cell/index.wxml b/pages/topics/activity/cell/index.wxml index 9d0e228..e770956 100644 --- a/pages/topics/activity/cell/index.wxml +++ b/pages/topics/activity/cell/index.wxml @@ -4,7 +4,7 @@ - {{title}} + {{title}} diff --git a/pages/topics/activity/cell/index.wxss b/pages/topics/activity/cell/index.wxss index 242f16a..d4ae332 100644 --- a/pages/topics/activity/cell/index.wxss +++ b/pages/topics/activity/cell/index.wxss @@ -5,6 +5,7 @@ justify-content: space-between; /* width: 70%; */ flex:1; + height: 100%; } .leftActive{ display: flex; @@ -16,7 +17,7 @@ display: flex; flex: row; justify-content: space-between; - padding: 5px 0; + padding: 5px 0 0 0; } .left-bottom-userInfo{ display: flex; @@ -79,8 +80,8 @@ image{ border-radius: 5px; } .cell_title { - font-weight: 300; - font-size: 34rpx; + font-weight: 400; + font-size: 17px; color: #000; display: -webkit-box; -webkit-box-orient: vertical; @@ -124,7 +125,7 @@ image{ margin-left: -120px; display: flex; flex-direction: row; - padding: 60rpx 20rpx 40rpx 20rpx; + padding: 30rpx 20rpx 30rpx 20rpx; align-items: center; } .del { @@ -144,4 +145,7 @@ image{ .touch-move-active .del { -webkit-transform: translateX(0); transform: translateX(0); +} +.cell_title_readed { + color: #9C9C9C; } \ No newline at end of file diff --git a/pages/topics/activity/index.js b/pages/topics/activity/index.js index ef76e69..19ea974 100644 --- a/pages/topics/activity/index.js +++ b/pages/topics/activity/index.js @@ -27,14 +27,16 @@ Component({ */ methods: { clickListItem(e) { - console.log(e) - const activityId = e.detail.activityId; + // console.log(e) + const activityId = e.currentTarget.dataset.id; + const index = e.currentTarget.dataset.index; + this.triggerEvent('quitEvent',{id:activityId,index:index}); wx.navigateTo({ url: `/pages/topics/activity/activityDetail/index?activityId=${activityId}`, }) }, deleteTopic(e){ this.triggerEvent('deleteTopic', { id: e.detail.id }) - } + }, } }) diff --git a/pages/topics/activity/index.wxml b/pages/topics/activity/index.wxml index 2f87897..c728f2b 100644 --- a/pages/topics/activity/index.wxml +++ b/pages/topics/activity/index.wxml @@ -7,8 +7,11 @@ activityImg="{{item.activityImg}}" time="{{item.time}}" commentNum="{{item.commentNum}}" - bind:clickListItem="clickListItem" dataIndex="{{item.dataIndex}}" + data-id="{{item.activityId}}" + data-index="{{index}}" + readed="{{item.readed}}" + bind:tap="clickListItem" /> diff --git a/pages/topics/attract/ocean/index.js b/pages/topics/attract/ocean/index.js index 32f0a92..b459ea5 100644 --- a/pages/topics/attract/ocean/index.js +++ b/pages/topics/attract/ocean/index.js @@ -120,7 +120,7 @@ Page({ }, //海洋人才赋能中心点击列表cell获取id,进入页面 clickListItem(e) { - //console.log(e.detail) + console.log(e) const { id, index diff --git a/pages/topics/index.js b/pages/topics/index.js index 8f1f1af..95a82f6 100644 --- a/pages/topics/index.js +++ b/pages/topics/index.js @@ -235,7 +235,6 @@ Page({ var th = this; var page = th.data.page; var list = th.data.centerList; - if (th.data.typeList.length == 0) { topicModel.getResourceTypeList(res => { this.setData({ @@ -243,7 +242,6 @@ Page({ }) }) } - topicModel.getResourceList('', page, res => { if (res.result.records.length > 0) { list = list.concat(res.result.records); @@ -392,6 +390,7 @@ Page({ commentNum: item.commentNum, dataIndex: index + ((page - 1) * 10), isTouchMove: false, + readed: item.isRead == 0 ? false : true }) }) @@ -409,5 +408,15 @@ Page({ }) }, - + changeActivityStatus:function(e){ + console.log("我是被子组件触发的",e); + const { + id, + index + } = e.detail + this.setData({ + [`activityList[${index}].readed`]: true + }) + console.log(this.data.activityList) + } }) \ No newline at end of file diff --git a/pages/topics/index.wxml b/pages/topics/index.wxml index 907c68d..5f9ba7f 100644 --- a/pages/topics/index.wxml +++ b/pages/topics/index.wxml @@ -28,7 +28,7 @@ - +