| @@ -15,10 +15,17 @@ Page({ | |||||
| onLoad(options) { | onLoad(options) { | ||||
| let that = this; | let that = this; | ||||
| console.log(options.couponChannelId); | console.log(options.couponChannelId); | ||||
| console.log(options.couponId); | |||||
| /** | |||||
| * 首页banner detail couponlist传过来的值 | |||||
| * iambannercoupon | |||||
| */ | |||||
| that.setData({ | that.setData({ | ||||
| couponChannelId: options.couponChannelId, | couponChannelId: options.couponChannelId, | ||||
| couponId: options.couponId | couponId: options.couponId | ||||
| }); | }); | ||||
| wx.showLoading({ | wx.showLoading({ | ||||
| title: "加载中..." | title: "加载中..." | ||||
| }); | }); | ||||
| @@ -26,13 +33,26 @@ Page({ | |||||
| if (options.flag) { | if (options.flag) { | ||||
| this.orderFunc(); | this.orderFunc(); | ||||
| } else { | } else { | ||||
| Http.get({ | |||||
| url: config.api.couponDetail, | |||||
| data: { | |||||
| if(options.couponChannelId=='iambannercoupon'){ | |||||
| /** | |||||
| * 待解决 | |||||
| */ | |||||
| var details ={ | |||||
| couponChannelId: options.couponId | |||||
| } | |||||
| }else{ | |||||
| var details ={ | |||||
| couponChannelId: options.couponChannelId | couponChannelId: options.couponChannelId | ||||
| } | } | ||||
| } | |||||
| Http.get({ | |||||
| url: config.api.couponDetail, | |||||
| data: details | |||||
| }).then(res => { | }).then(res => { | ||||
| console.log(res); | console.log(res); | ||||
| console.log("details") | |||||
| //当前时间与优惠券下架时间做计算 | //当前时间与优惠券下架时间做计算 | ||||
| var startTime = util.fmtDate(res.data.endTime); | var startTime = util.fmtDate(res.data.endTime); | ||||
| console.log(startTime); | console.log(startTime); | ||||