|
...
|
...
|
@@ -29,6 +29,7 @@ Page({ |
|
|
|
hasValueRecharge: false, //商家是否开通充值功能
|
|
|
|
couponData: '', //评价赠送优惠券数据
|
|
|
|
},
|
|
|
|
give_user:'',
|
|
|
|
/**
|
|
|
|
* 生命周期函数--监听页面加载
|
|
|
|
*/
|
|
...
|
...
|
@@ -66,6 +67,7 @@ Page({ |
|
|
|
rid: this.data.options.id
|
|
|
|
}).then(res => {
|
|
|
|
let reserev = RS.reserve(res.data)
|
|
|
|
this.give_user = reserev.give_user ? reserev.give_user : '2';
|
|
|
|
this.setData({
|
|
|
|
is_user_comments: res.data.is_user_comments,
|
|
|
|
seller: {
|
|
...
|
...
|
@@ -348,8 +350,21 @@ Page({ |
|
|
|
let freeCoupons = list.filter(item => {
|
|
|
|
return item.is_type == '3'
|
|
|
|
})
|
|
|
|
let give = this.give_user;
|
|
|
|
let couponShow = false;
|
|
|
|
switch (give) {
|
|
|
|
case '1':
|
|
|
|
couponShow = this.data.options.hasSellerShare == '1' ? true : false;
|
|
|
|
break;
|
|
|
|
case '2':
|
|
|
|
couponShow = true;
|
|
|
|
break;
|
|
|
|
case '3':
|
|
|
|
couponShow = this.data.options.hasSellerShare != '1' ? true : false;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
// 显示已领取
|
|
|
|
if (freeCoupons.length > 0) {
|
|
|
|
if (freeCoupons.length > 0 && couponShow) {
|
|
|
|
this.getCoupon(freeCoupons,obj)
|
|
|
|
}
|
|
|
|
console.log('邀请函--------------------优惠券', list);
|
...
|
...
|
|