|
@@ -14,8 +14,11 @@ Page({ |
|
|
}, |
|
|
}, |
|
|
onLoad(options) { |
|
|
onLoad(options) { |
|
|
let that = this; |
|
|
let that = this; |
|
|
|
|
|
console.log(options); |
|
|
console.log(options.couponChannelId); |
|
|
console.log(options.couponChannelId); |
|
|
console.log(options.couponId); |
|
|
console.log(options.couponId); |
|
|
|
|
|
console.log(options.Id); |
|
|
|
|
|
console.log("传的变量的名字叫Id"); |
|
|
/** |
|
|
/** |
|
|
* 首页banner detail couponlist传过来的值 |
|
|
* 首页banner detail couponlist传过来的值 |
|
|
* iambannercoupon |
|
|
* iambannercoupon |
|
@@ -33,26 +36,28 @@ Page({ |
|
|
if (options.flag) { |
|
|
if (options.flag) { |
|
|
this.orderFunc(); |
|
|
this.orderFunc(); |
|
|
} else { |
|
|
} 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(res); |
|
|
console.log("details") |
|
|
|
|
|
|
|
|
console.log("details"); |
|
|
//当前时间与优惠券下架时间做计算 |
|
|
//当前时间与优惠券下架时间做计算 |
|
|
var startTime = util.fmtDate(res.data.endTime); |
|
|
var startTime = util.fmtDate(res.data.endTime); |
|
|
console.log(startTime); |
|
|
console.log(startTime); |
|
|