From 1af7f45b708cede35a588bc973a1c240d6e6e9c0 Mon Sep 17 00:00:00 2001 From: caserKing Date: Sat, 3 Aug 2019 15:07:53 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8B=BC=E5=9B=A2=E7=A0=8D=E4=BB=B7=E7=9A=84?= =?UTF-8?q?=E5=88=B7=E6=96=B0=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/hot/index.js | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) 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: '' + }); + } }