diff --git a/components/hot/index.js b/components/hot/index.js index 01ca36e..586b9cd 100644 --- a/components/hot/index.js +++ b/components/hot/index.js @@ -34,6 +34,7 @@ Component({ methods: { //获取砍价拼团数据 getList(val) { + // debugger let that = this; let param = '' if(val=='1'){ @@ -51,7 +52,9 @@ Component({ url: config.api.change, data:param, }).then(res => { - if(res.data){ + console.log(res) + console.log(123) + if(res.data != undefined && res.data){ if(val=='1'){ that.setData({ kData: res.data.data, @@ -64,6 +67,22 @@ Component({ pSize:res.data.size, couponId1: res.data.data.couponId }); + + } + } else { + if(val=='1'){ + that.setData({ + kData: '', + kSize: '', + couponId: '', + }); + }else{ + that.setData({ + pData: '', + pSize:'', + couponId1: '' + }); + } }