Commit 6f663702 by 高淑倩

modify: 优惠券列表_swiperTab

parent 93215825
......@@ -35,9 +35,20 @@ wxService.page({
//滑动切换
swiperTab: function (e) {
const {current} = e.detail
this.setData({
currentTab: current
});
if (this.data.currentTab == current) {
return false;
} else {
this.setData({
currentTab: current
})
}
// 可使用
if( current == 0 ){
this.getCouponList(1,10,1)
}else if( current == 1){
// 失效
this.getCouponList(1,10,0)
}
},
// 点击切换
clickTab: function (e) {
......
......@@ -5,7 +5,7 @@
<view class="swiper-tab-item {{currentTab==1?'active':''}}" data-current="1" bindtap="clickTab">已失效 ({{invalidTotalElements}})</view>
</view>
<!--bindchange="swiperTab"-->
<swiper current="{{currentTab}}" duration="300">
<swiper current="{{currentTab}}" duration="300" bindchange="swiperTab">
<swiper-item>
<scroll-view scroll-y wx:if="{{couponList.length}}">
<view class='coupon-wrap'>
......
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