From d0274e3ee24448dd37935d1db6da915485799fed Mon Sep 17 00:00:00 2001 From: ZhaoTongYao <531131322@qq.com> Date: Thu, 23 Jul 2020 16:05:53 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BF=97=E5=8F=8B=E6=9C=B5=E6=9C=B5=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E6=B3=A8=E5=86=8C=E4=BA=BA=E6=95=B0=EF=BC=9B=E9=94=A6?= =?UTF-8?q?=E6=B0=B4=E5=91=B3=E9=81=93=E4=BA=8C=E7=BA=A7=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E5=88=97=E8=A1=A8=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/activity/activity.wxss | 12 ++++++------ pages/heartNew/heartNew.js | 8 +++++--- pages/heartNew/heartNew.wxml | 1 + pages/heartNew/heartNew.wxss | 6 ++++++ subpages/understandJs/pages/delicious/delicious.js | 2 +- subpages/understandJs/pages/index/index.js | 6 +++++- .../understandJs/pages/noticeDetail/noticeDetail.js | 2 +- utils/activity.js | 5 +++++ 8 files changed, 30 insertions(+), 12 deletions(-) diff --git a/components/activity/activity.wxss b/components/activity/activity.wxss index c0662df..2945ddb 100644 --- a/components/activity/activity.wxss +++ b/components/activity/activity.wxss @@ -12,13 +12,13 @@ .img { display: table-cell; - width: 220rpx; + width: 190rpx; padding: 20rpx 20rpx 10rpx 20rpx; height: 246rpx; } .img .imgsrc { - width: 220rpx; + width: 190rpx; height: 246rpx; background: #f1f1f1; border-radius: 16rpx; @@ -28,7 +28,7 @@ .left { display: table-cell; padding: 20rpx 20rpx 10rpx 20rpx; - width: 220rpx; + width: 190rpx; height: 246rpx; border-radius: 16rpx; overflow: hidden; @@ -151,7 +151,7 @@ .total, .signed { display: block; - font-size: 26rpx; + font-size: 28rpx; padding: 0px 20rpx 0px 20rpx; height: 40rpx; line-height: 40rpx; @@ -161,8 +161,8 @@ } .total { - background: #d9d9d9; - color: #666; + /* background: #d9d9d9; + color: #666; */ } .signed { diff --git a/pages/heartNew/heartNew.js b/pages/heartNew/heartNew.js index 32f6485..6a46437 100644 --- a/pages/heartNew/heartNew.js +++ b/pages/heartNew/heartNew.js @@ -32,6 +32,7 @@ Page({ qkdat: false,//判断是否清空数据 actId: "",//判断返回以后是否需要刷新列表 volunteerlist:[],//志愿者列表 + volunteerCount: 0, //志愿者注册数 listLength:0,//数据长度判断是否需要加载 getImgUrl:"", ifClickImage:false,//因为志友多多点击图片查看大图,会出现列表刷新的bug,所以加这个字段进行控制 @@ -195,8 +196,8 @@ Page({ // 志愿者列表 volunteerlist (params){ let that = this - api.volunteerlist(params).then(function (res) { - if (res.data.length !== that.data.pageSize) { + api.volunteerV2list(params).then(function (res) { + if (res.data.volunteerList.length !== that.data.pageSize) { that.setData({ loadMoreVisible: true, loadMoreType: "none", @@ -204,7 +205,8 @@ Page({ } that.setData({ listLength:res.data.length, - volunteerlist:that.data.volunteerlist.concat(res.data) + volunteerlist:that.data.volunteerlist.concat(res.data.volunteerList), + volunteerCount: res.data.volunteerCount }) }) }, diff --git a/pages/heartNew/heartNew.wxml b/pages/heartNew/heartNew.wxml index 15c6845..5677403 100644 --- a/pages/heartNew/heartNew.wxml +++ b/pages/heartNew/heartNew.wxml @@ -77,6 +77,7 @@ + 志愿者注册数:{{volunteerCount}} diff --git a/pages/heartNew/heartNew.wxss b/pages/heartNew/heartNew.wxss index de938dd..e02dbfd 100644 --- a/pages/heartNew/heartNew.wxss +++ b/pages/heartNew/heartNew.wxss @@ -370,6 +370,12 @@ button:last-child { .details-top { margin-top: 385rpx; } +.reg-count { + font-size: 22rpx; + color: #999; + line-height: 22rpx; + padding-left: 40rpx; +} .volunteer-box { display: flex; diff --git a/subpages/understandJs/pages/delicious/delicious.js b/subpages/understandJs/pages/delicious/delicious.js index e27d011..df1637b 100644 --- a/subpages/understandJs/pages/delicious/delicious.js +++ b/subpages/understandJs/pages/delicious/delicious.js @@ -113,7 +113,7 @@ Page({ }, //跳转倒详情页面 - toDetail (e){ + toDetail (e){ wx.navigateTo({ url: `../noticeDetail/noticeDetail?id=${e.currentTarget.dataset.id}&modulecode=${this.data.noticeCategory}` }) diff --git a/subpages/understandJs/pages/index/index.js b/subpages/understandJs/pages/index/index.js index b946371..2eb502b 100644 --- a/subpages/understandJs/pages/index/index.js +++ b/subpages/understandJs/pages/index/index.js @@ -73,10 +73,14 @@ Page({ }, goDetails(e) {//模块编码(印象,味道,硬核) console.log(JSON.stringify(e.currentTarget.dataset) + e.currentTarget.dataset.modulecode) - if (e.currentTarget.dataset.modulecode == 'notice_impression' || e.currentTarget.dataset.modulecode == 'notice_taste') {//印象//味道 + if (e.currentTarget.dataset.modulecode == 'notice_impression') { wx.navigateTo({ url: `../noticeDetail/noticeDetail?modulecode=${e.currentTarget.dataset.modulecode}` }) + } else if (e.currentTarget.dataset.modulecode == 'notice_taste') { + wx.navigateTo({ + url: `../delicious/delicious?modulecode=${e.currentTarget.dataset.modulecode}` + }) } else if (e.currentTarget.dataset.modulecode == 'notice_yh') { wx.navigateTo({ url: `../sclerotia/sclerotia?modulecode=${e.currentTarget.dataset.modulecode}` diff --git a/subpages/understandJs/pages/noticeDetail/noticeDetail.js b/subpages/understandJs/pages/noticeDetail/noticeDetail.js index 0b579a6..c0a4b61 100644 --- a/subpages/understandJs/pages/noticeDetail/noticeDetail.js +++ b/subpages/understandJs/pages/noticeDetail/noticeDetail.js @@ -25,7 +25,7 @@ Page({ wx.setNavigationBarTitle({ title: "锦水味道" }) - this.noticelist() + this.noticeDetail(options.id) } else if(options.modulecode == "notice_impression"){ wx.setNavigationBarTitle({ title: "锦水印象" diff --git a/utils/activity.js b/utils/activity.js index f0f9dbb..a78a6cb 100644 --- a/utils/activity.js +++ b/utils/activity.js @@ -4,6 +4,7 @@ module.exports = { bannerList, bannerListV2, volunteerlist, + volunteerV2list, getImgUrl } @@ -22,6 +23,10 @@ function bannerListV2 () { function volunteerlist (params) { return fly.get("app-user/volunteer/list",params) } +// 志愿者列表v2 +function volunteerV2list (params) { + return fly.get("app-user/volunteer/v2/list",params) +} // 获取配置图片 function getImgUrl (imgType) { return fly.get(`imgConfig/getImgUrl/${imgType}`)