From 10d2dafa9b3190a0ddd43ab0bea2af6c1e114520 Mon Sep 17 00:00:00 2001 From: meo <958484406@qq.com> Date: Wed, 29 Aug 2018 00:30:59 +0800 Subject: [PATCH] =?UTF-8?q?[banner=E8=AF=A6=E6=83=85=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E5=BE=85=E8=A7=A3=E5=86=B3][=E4=BF=AE=E6=94=B9]:banner?= =?UTF-8?q?=E8=AF=A6=E6=83=85l=E4=BF=AE=E6=94=B9=EF=BC=8C=E5=BE=85?= =?UTF-8?q?=E8=A7=A3=E5=86=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/coupon/detail/index.js | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/pages/coupon/detail/index.js b/pages/coupon/detail/index.js index c0039ac..29fd101 100644 --- a/pages/coupon/detail/index.js +++ b/pages/coupon/detail/index.js @@ -15,10 +15,17 @@ Page({ onLoad(options) { let that = this; console.log(options.couponChannelId); + console.log(options.couponId); + /** + * 首页banner detail couponlist传过来的值 + * iambannercoupon + */ + that.setData({ couponChannelId: options.couponChannelId, couponId: options.couponId }); + wx.showLoading({ title: "加载中..." }); @@ -26,13 +33,26 @@ Page({ if (options.flag) { this.orderFunc(); } else { - Http.get({ - url: config.api.couponDetail, - data: { + + if(options.couponChannelId=='iambannercoupon'){ + /** + * 待解决 + */ + var details ={ + couponChannelId: options.couponId + } + }else{ + var details ={ couponChannelId: options.couponChannelId } + } + + Http.get({ + url: config.api.couponDetail, + data: details }).then(res => { console.log(res); + console.log("details") //当前时间与优惠券下架时间做计算 var startTime = util.fmtDate(res.data.endTime); console.log(startTime);