Commit 13836622 by 谢中龙

去除打印

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