Commit 50bea767 by 高淑倩

modify: 优惠券列表切换问题

parent b7cefa1a
......@@ -47,8 +47,8 @@ wxService.page({
} else {
this.setData({
currentTab: current,
couponList: [], // 清空数据
invalidCouponList: [],
// couponList: [], // 清空数据
// invalidCouponList: [],
})
}
......@@ -85,12 +85,24 @@ wxService.page({
params = {
status: 1
}
if(pageNo == 1){
this.setData({
pageNo: 1,
couponList: [], // 清空数据
})
}
} else {
params = {
statusNot: 1
}
if(pageNo == 1){
this.setData({
invalidCouponList: [],
invalidPageNo: 1
})
}
}
wxService.post(`/coupon/coupon/listWithMember4Mina?number=${pageNo}&size=${pageSize}`, params).then(res => {
const {result,data} = res.data
if(result == 0){
......@@ -116,7 +128,6 @@ wxService.page({
invalidTotalElements: data.totalElements
})
}
}
}).finally(() => {
......@@ -133,7 +144,6 @@ wxService.page({
onReachBottom: function () {
// 可使用 0 or 已失效 1
const { currentTab, pageNo, pageSize, totalPages, invalidPageNo,invalidTotalPages } = this.data
console.log('2222',currentTab)
if(currentTab == 0) {
if ( pageNo < totalPages) {
this.setData({
......
......@@ -57,7 +57,7 @@
<image src='/assets/imgs/qr-code.png' />
</view>
<view class='coupon-info'>
<view class='coupon-name fs-28'>{{item.typeDesc}}</view>
<view class='coupon-name fs-28'>{{item.title}}</view>
<view class='coupon-time fs-24'>{{item.startTime}} 至 {{item.endTime}}</view>
<view class='coupon-desc fs-24'>{{item.notice}}</view>
</view>
......
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