From be7835ee47f6c65d77777432e357a8a4ced083a3 Mon Sep 17 00:00:00 2001 From: meo <958484406@qq.com> Date: Wed, 29 Aug 2018 10:49:27 +0800 Subject: [PATCH] =?UTF-8?q?[banerlist=E7=9A=84detail=E7=9A=84couponlist?= =?UTF-8?q?=E7=9A=84coupondetail][=E4=BF=AE=E6=94=B9]:banner=E8=AF=A6?= =?UTF-8?q?=E6=83=85=E4=BC=98=E6=83=A0=E5=88=B8=E5=88=97=E8=A1=A8=E7=9A=84?= =?UTF-8?q?=E8=AF=A6=E6=83=85=E9=A1=B5=E9=9D=A2=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/config.js | 5 +++++ pages/bannerdetail/index.wxml | 2 +- pages/coupon/detail/index.js | 33 +++++++++++++++++++-------------- 3 files changed, 25 insertions(+), 15 deletions(-) diff --git a/config/config.js b/config/config.js index e788e02..0b12fcd 100755 --- a/config/config.js +++ b/config/config.js @@ -31,6 +31,11 @@ var config = { * 优惠券详情 */ couponDetail: "/wxCoupon/detail", + + /** + * bannerlist优惠券的详情页面 + */ + bannercoupondetai:"/wxCoupon/detailC", /** * 业态查询 */ diff --git a/pages/bannerdetail/index.wxml b/pages/bannerdetail/index.wxml index 8d94e04..af66fb4 100644 --- a/pages/bannerdetail/index.wxml +++ b/pages/bannerdetail/index.wxml @@ -37,7 +37,7 @@ --> - + diff --git a/pages/coupon/detail/index.js b/pages/coupon/detail/index.js index 29fd101..94bebc6 100644 --- a/pages/coupon/detail/index.js +++ b/pages/coupon/detail/index.js @@ -14,8 +14,11 @@ Page({ }, onLoad(options) { let that = this; + console.log(options); console.log(options.couponChannelId); console.log(options.couponId); + console.log(options.Id); + console.log("传的变量的名字叫Id"); /** * 首页banner detail couponlist传过来的值 * iambannercoupon @@ -33,26 +36,28 @@ Page({ if (options.flag) { this.orderFunc(); } else { - - if(options.couponChannelId=='iambannercoupon'){ + if (options.couponChannelId == "iambannercoupon") { /** * 待解决 */ - var details ={ - couponChannelId: options.couponId - } - }else{ - var details ={ - couponChannelId: options.couponChannelId - } + var parmer = { + url: config.api.bannercoupondetai, + data: { + couponId: options.Id + } + }; + } else { + var parmer = { + url: config.api.couponDetail, + data: { + couponChannelId: options.couponChannelId + } + }; } - Http.get({ - url: config.api.couponDetail, - data: details - }).then(res => { + Http.get(parmer).then(res => { console.log(res); - console.log("details") + console.log("details"); //当前时间与优惠券下架时间做计算 var startTime = util.fmtDate(res.data.endTime); console.log(startTime);