Browse Source

优化

master
zhaoyongnian 5 years ago
parent
commit
22548d6128
  1. 16
      pages/heart/heart.js
  2. 3
      pages/heart/heart.json
  3. 2
      subpages/heart/pages/heartDetail/heartDetail.wxml
  4. 1
      subpages/heart/pages/signed/signed.js
  5. 10
      subpages/heart/pages/volunteer/volunteer.js

16
pages/heart/heart.js

@ -84,6 +84,18 @@ Page({
}) })
}, },
onReachBottom: function() { onReachBottom: function() {
if (this.data.listLength !== this.data.pageSize) {
this.setData({
loadMoreVisible: true,
loadMoreType: 'none',
})
} else {
this.setData({
loadMoreVisible: true,
loadMoreType: 'loading',
})
}
if (this.data.key == 'tab1') { if (this.data.key == 'tab1') {
this.setData({ this.setData({
index: 0 index: 0
@ -125,6 +137,10 @@ Page({
}) })
}, },
onTabsChange(e) { onTabsChange(e) {
this.setData({
loadMoreVisible: false,
loadMoreType: 'none',
})
const { const {
key key
} = e.detail } = e.detail

3
pages/heart/heart.json

@ -4,7 +4,8 @@
"wux-tabs": "/dist/tabs/index", "wux-tabs": "/dist/tabs/index",
"wux-tab": "/dist/tab/index", "wux-tab": "/dist/tab/index",
"activity": "../../components/activity/activity", "activity": "../../components/activity/activity",
"load-more": "../../components/loadMore/loadMore" "load-more": "../../components/loadMore/loadMore",
"no-data": "../../components/nodata/nodata"
}, },
"enablePullDownRefresh": true, "enablePullDownRefresh": true,
"backgroundColor": "#f8f8f8", "backgroundColor": "#f8f8f8",

2
subpages/heart/pages/heartDetail/heartDetail.wxml

@ -46,7 +46,7 @@
<image src="../../images/mdsz.png"></image> <image src="../../images/mdsz.png"></image>
<view class="info-font display-inline">活动名额</view> <view class="info-font display-inline">活动名额</view>
</view> </view>
<view class="info-right color"> <view class="info-right color" wx:if="{{detail.actQuotaCategory}}">
{{ detail.actQuotaCategory === 0 ? '不限名额' : detail.actQuota + '人'}} {{ detail.actQuotaCategory === 0 ? '不限名额' : detail.actQuota + '人'}}
</view> </view>
<view class="clear"></view> <view class="clear"></view>

1
subpages/heart/pages/signed/signed.js

@ -21,6 +21,7 @@ Page({
this.getSignedList() this.getSignedList()
}, },
onShow () { onShow () {
this.pulldownRefresh()
if (!app.globalData.previewImage) { if (!app.globalData.previewImage) {
console.log('过滤previewImage引起的onShow') console.log('过滤previewImage引起的onShow')
} }

10
subpages/heart/pages/volunteer/volunteer.js

@ -112,7 +112,15 @@ Page({
encryptedData: e.detail.encryptedData, encryptedData: e.detail.encryptedData,
iv: e.detail.iv iv: e.detail.iv
}) })
this.submission() if (e.detail.iv){
this.submission()
}else{
wx.showToast({
title: '您拒绝了获取信息,无法完成认证',
icon: 'none',
duration: 3000
})
}
}, },
// 拉取 用户信息 // 拉取 用户信息
getPrepareComplete() { getPrepareComplete() {

Loading…
Cancel
Save