Commit 9c2b654a by 谢中龙

Merge branch '711_prod' into '711_dev_7.5.0'

711 prod

See merge request !178
parents 196d7cd6 64423d8b
...@@ -158,43 +158,33 @@ wxService.page({ ...@@ -158,43 +158,33 @@ wxService.page({
/** /**
* 页面相关事件处理函数--监听用户下拉动作 * 页面相关事件处理函数--监听用户下拉动作
*/ */
onPullDownRefresh: function () {}, //scoll view 触到底部
/** onBottom() {
* 页面上拉触底事件的处理函数 const { currentTab, pageNo, pageSize, totalPages, invalidPageNo, invalidTotalPages } = this.data
*/ if (currentTab == 0) {
onReachBottom: function () { if (pageNo < totalPages) {
// 可使用 0 or 已失效 1
const { currentTab, pageNo, pageSize, totalPages, invalidPageNo,invalidTotalPages } = this.data
if(currentTab == 0) {
if ( pageNo < totalPages) {
this.setData({ this.setData({
pageNo: pageNo + 1, pageNo: pageNo + 1,
}) })
// status 1 // status 1
this.getCouponList(this.data.pageNo,pageSize, 1) this.getCouponList(this.data.pageNo, pageSize, 1)
} else { } else {
this.setData({ this.setData({
noMoreCoupon: true noMoreCoupon: true
}) })
} }
} else { } else {
// if ( invalidPageNo < invalidTotalPages) {
// this.setData({
// invalidPageNo: invalidPageNo + 1,
// })
// // status 0
// this.getCouponList(this.data.invalidPageNo, pageSize, 0)
// } else {
// this.setData({
// noMoreCouponInvalid: true
// })
// }
this.setData({ this.setData({
noMoreCouponInvalid: true noMoreCouponInvalid: true
}) })
}
},
onPullDownRefresh: function () {},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
}
}, },
}) })
\ No newline at end of file
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<!--bindchange="swiperTab"--> <!--bindchange="swiperTab"-->
<swiper current="{{currentTab}}" duration="300" bindchange="swiperTab"> <swiper current="{{currentTab}}" duration="300" bindchange="swiperTab">
<swiper-item> <swiper-item>
<scroll-view scroll-y wx:if="{{couponList.length}}"> <scroll-view scroll-y wx:if="{{couponList.length}}" bindscrolltolower="onBottom">
<view class='coupon-wrap'> <view class='coupon-wrap'>
<view <view
class='coupon-list' class='coupon-list'
...@@ -31,7 +31,6 @@ ...@@ -31,7 +31,6 @@
</view> </view>
</view> </view>
</view> </view>
<no-more wx:if="{{noMoreCoupon}}" /> <no-more wx:if="{{noMoreCoupon}}" />
</scroll-view> </scroll-view>
<view class='empty-wrap' wx:if="{{!couponList.length}}"> <view class='empty-wrap' wx:if="{{!couponList.length}}">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment