|
|
@@ -22,6 +22,8 @@ Component({ |
|
|
|
barginicon: imgurl.barginicon.url, |
|
|
|
wangmeimeibargin: imgurl.wangmeimeibargin.url, |
|
|
|
kData:[], |
|
|
|
kSize:'', |
|
|
|
pSize: '', |
|
|
|
pData:[], |
|
|
|
couponId:'', |
|
|
|
couponId1: '', |
|
|
@@ -52,14 +54,15 @@ Component({ |
|
|
|
if(res.data){ |
|
|
|
if(val=='1'){ |
|
|
|
that.setData({ |
|
|
|
kData: res.data, |
|
|
|
couponId: res.data.couponId, |
|
|
|
// title:res.data. |
|
|
|
kData: res.data.data, |
|
|
|
kSize: res.data.size, |
|
|
|
couponId: res.data.data.couponId, |
|
|
|
}); |
|
|
|
}else{ |
|
|
|
that.setData({ |
|
|
|
pData: res.data, |
|
|
|
couponId1: res.data.couponId |
|
|
|
pData: res.data.data, |
|
|
|
pSize:res.data.size, |
|
|
|
couponId1: res.data.data.couponId |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
@@ -78,10 +81,11 @@ Component({ |
|
|
|
// 换一换 |
|
|
|
getChange(){ |
|
|
|
let that = this; |
|
|
|
if (that.data.couponId){ |
|
|
|
|
|
|
|
if (that.pSize != 1 && that.pSize != 0){ |
|
|
|
this.getList(1) |
|
|
|
} |
|
|
|
if (that.data.couponId1) { |
|
|
|
if (that.pSize != 1 && that.pSize != 0) { |
|
|
|
this.getList(2) |
|
|
|
} |
|
|
|
}, |
|
|
|