Commit 13836622 by 谢中龙

去除打印

parent 1d8d2134
......@@ -28,8 +28,6 @@ Component({
baseImgUrl: app.globalData.imageUrl
})
const { tabBar } = this.data
console.log(this.data.currHomePageId)
console.log(tabBar)
let currentTab = tabBar.images
currentTab.forEach(item => {
// 存在 row 处理数据 8 商品 9 分类
......
......@@ -160,36 +160,31 @@ wxService.page({
// console.log(this.data.currentTab)
// wx.stopPullDownRefresh();
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
// 可使用 0 or 已失效 1
const { currentTab, pageNo, pageSize, totalPages, invalidPageNo,invalidTotalPages } = this.data
if(currentTab == 0) {
if ( pageNo < totalPages) {
this.setData({
pageNo: pageNo + 1,
})
// status 1
this.getCouponList(this.data.pageNo,pageSize, 1)
} else {
this.setData({
noMoreCoupon: true
})
}
} else {
if ( invalidPageNo < invalidTotalPages) {
//scoll view 触到底部
onBottom(){
const { currentTab, pageNo, pageSize, totalPages, invalidPageNo, invalidTotalPages } = this.data
if (currentTab == 0) {
if (pageNo < totalPages) {
this.setData({
invalidPageNo: invalidPageNo + 1,
pageNo: pageNo + 1,
})
// status 0
this.getCouponList(this.data.invalidPageNo, pageSize, 0)
} else {
// status 1
this.getCouponList(this.data.pageNo, pageSize, 1)
} else {
this.setData({
noMoreCouponInvalid: true
noMoreCoupon: true
})
}
} else {
this.setData({
noMoreCouponInvalid: true
})
}
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
})
\ No newline at end of file
......@@ -7,7 +7,7 @@
<!--bindchange="swiperTab"-->
<swiper current="{{currentTab}}" duration="300" bindchange="swiperTab">
<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-list'
......@@ -73,6 +73,7 @@
<view class='coupon-code fs-24'>出示劵码</view>
</view>
</view>
<view class='no-more-exp'>--- 已失效优惠券最多显示10条 ---</view>
<no-more wx:if="{{noMoreCouponInvalid}}" />
</scroll-view>
......
......@@ -40,6 +40,15 @@ scroll-view{
font-size: 28rpx;
}
.no-more-exp{
display: flex;
padding: 20rpx;
font-size: 24rpx;
color: #999999;
justify-content: center;
align-items: center;
}
/* 卡劵列表 */
.coupon-wrap{
padding: 20rpx;
......
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