|
@@ -17,18 +17,11 @@ Page({ |
|
|
console.log(options); |
|
|
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"); |
|
|
console.log("传的变量的名字叫Id"); |
|
|
/** |
|
|
/** |
|
|
* 首页banner detail couponlist传过来的值 |
|
|
* 首页banner detail couponlist传过来的值 |
|
|
* iambannercoupon |
|
|
* iambannercoupon |
|
|
*/ |
|
|
*/ |
|
|
|
|
|
|
|
|
that.setData({ |
|
|
|
|
|
couponChannelId: options.couponChannelId, |
|
|
|
|
|
couponId: options.couponId |
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
wx.showLoading({ |
|
|
wx.showLoading({ |
|
|
title: "加载中..." |
|
|
title: "加载中..." |
|
|
}); |
|
|
}); |
|
@@ -37,16 +30,23 @@ Page({ |
|
|
this.orderFunc(); |
|
|
this.orderFunc(); |
|
|
} else { |
|
|
} else { |
|
|
if (options.couponChannelId == "iambannercoupon") { |
|
|
if (options.couponChannelId == "iambannercoupon") { |
|
|
|
|
|
that.setData({ |
|
|
|
|
|
couponId: options.couponId |
|
|
|
|
|
}); |
|
|
/** |
|
|
/** |
|
|
* 待解决 |
|
|
* 待解决 |
|
|
*/ |
|
|
*/ |
|
|
var parmer = { |
|
|
var parmer = { |
|
|
url: config.api.bannercoupondetai, |
|
|
url: config.api.bannercoupondetai, |
|
|
data: { |
|
|
data: { |
|
|
couponId: options.Id |
|
|
|
|
|
|
|
|
couponId: options.couponId |
|
|
} |
|
|
} |
|
|
}; |
|
|
}; |
|
|
} else { |
|
|
} else { |
|
|
|
|
|
that.setData({ |
|
|
|
|
|
couponChannelId: options.couponChannelId, |
|
|
|
|
|
couponId: options.couponId |
|
|
|
|
|
}); |
|
|
var parmer = { |
|
|
var parmer = { |
|
|
url: config.api.couponDetail, |
|
|
url: config.api.couponDetail, |
|
|
data: { |
|
|
data: { |
|
@@ -134,15 +134,21 @@ Page({ |
|
|
}) |
|
|
}) |
|
|
.then(res => { |
|
|
.then(res => { |
|
|
console.log(res); |
|
|
console.log(res); |
|
|
|
|
|
var data = { |
|
|
|
|
|
couponChannelId: "" + that.data.couponChannelId, |
|
|
|
|
|
couponId: "" + that.data.couponId |
|
|
|
|
|
} |
|
|
|
|
|
if (that.data.couponChannelId == null) { |
|
|
|
|
|
data = { |
|
|
|
|
|
couponId: "" + that.data.couponId |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
/** |
|
|
/** |
|
|
* orderSave 下单 |
|
|
* orderSave 下单 |
|
|
*/ |
|
|
*/ |
|
|
return Http.post({ |
|
|
return Http.post({ |
|
|
url: config.api.orderSave, |
|
|
url: config.api.orderSave, |
|
|
data: { |
|
|
|
|
|
couponChannelId: "" + that.data.couponChannelId, |
|
|
|
|
|
couponId: "" + that.data.couponId |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
data: data |
|
|
}); |
|
|
}); |
|
|
}) |
|
|
}) |
|
|
.catch(err => { |
|
|
.catch(err => { |
|
|