Commit 11108755 by 高淑倩

modify: 优惠券切换清空数据

parent 238711a6
...@@ -42,14 +42,16 @@ wxService.page({ ...@@ -42,14 +42,16 @@ wxService.page({
// 点击切换 // 点击切换
clickTab: function (e) { clickTab: function (e) {
const {current} = e.target.dataset const {current} = e.target.dataset
console.log('点击切换', current, this.data.currentTab)
if (this.data.currentTab == current) { if (this.data.currentTab == current) {
return false; return false;
} else { } else {
this.setData({ this.setData({
currentTab: current currentTab: current,
couponList: [], // 清空数据
invalidCouponList: [],
}) })
} }
// 可使用 // 可使用
if( current == 0 ){ if( current == 0 ){
this.getCouponList(1,10,1) this.getCouponList(1,10,1)
......
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