Browse Source

志友朵朵显示注册人数;锦水味道二级页面显示列表;

master
ZhaoTongYao 5 years ago
parent
commit
d0274e3ee2
  1. 12
      components/activity/activity.wxss
  2. 8
      pages/heartNew/heartNew.js
  3. 1
      pages/heartNew/heartNew.wxml
  4. 6
      pages/heartNew/heartNew.wxss
  5. 2
      subpages/understandJs/pages/delicious/delicious.js
  6. 6
      subpages/understandJs/pages/index/index.js
  7. 2
      subpages/understandJs/pages/noticeDetail/noticeDetail.js
  8. 5
      utils/activity.js

12
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 {

8
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
})
})
},

1
pages/heartNew/heartNew.wxml

@ -77,6 +77,7 @@
<!-- 志友朵朵 -->
<block wx:if="{{ selectedTab == 'tab1' }}">
<view class="details-top">
<view class="reg-count">志愿者注册数:{{volunteerCount}}</view>
<view class="volunteer-box">
<volunteer-list bind:clickImage="clickImage" wx:for="{{volunteerlist}}" volunteerItemObj="{{item}}" wx:for-index="index" wx:for-item="item" wx:key="{{index}}"></volunteer-list>
</view>

6
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;

2
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}`
})

6
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}`

2
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: "锦水印象"

5
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}`)

Loading…
Cancel
Save