Commit 53789388f5c9c4d2c7ec9ede17e3fd7728e6027d

Authored by pengye
1 parent 74a7e9f6

付费券免费券都跳转一个页面,邀请函商家详情商家有礼跳转路径修改

... ... @@ -80,6 +80,7 @@ Page({
let fullData = data.full_reduction_data ? util.determine(data.full_reduction_data) : ''
let coupons = fullData.coupons ? util.determine(fullData.coupons) : '';
const now = Math.floor(Date.now() / 1000);
console.log('满减---',{...fullData},{...coupons},now);
// 在送券活动开始的有效期之内
if (now >= parseInt(fullData.stime) && now <= parseInt(fullData.etime)) {
// rule 1每满门槛均发放(满50送一张券,金额是100送2张)
... ... @@ -98,9 +99,11 @@ Page({
let stairsData = data.stairs_data ? util.determine(data.stairs_data) : ''
let ladder_data = stairsData.ladder_data ? util.determine(stairsData.ladder_data) : '';
const now = Math.floor(Date.now() / 1000);
console.log('阶梯---',{...stairsData},{...ladder_data},now);
// 在送券活动开始的有效期之内
if (now >= parseInt(stairsData.stime) && now <= parseInt(stairsData.etime)) {
let obj = this.findObjectByNum(ladder_data, priceSum)
console.log('在送券活动开始的有效期之内',{...obj});
if (obj && obj.coupons) {
let coupons = obj.coupons ? util.determine(obj.coupons) : '';
this.getCouponFun(coupons, '2', '1',orderid)
... ...
... ... @@ -11,9 +11,12 @@ Page({
dataStr: Date.now() * 1 / 1000,
detail: {},
exp_date: {},
couponType:'',//1代金券 2折扣券 3菜品券
resultCoupon: '', //0未领取 1已领取
seller: {},
distance: '',
num: 1,
totalize: '',
},
myModal: '',
myToast:'',
... ... @@ -39,7 +42,7 @@ Page({
id: options.id || obj.id,
sid: options.sid || obj.sid,
oid: options.oid,
types: options.types || obj.types, //1是邀请函过来的(邀请函的券或者点击意见反馈买券) 2是提前点餐 3是商家APP分享的或者短信的链接 4好友赠送的券
types: options.types || obj.types, //1是邀请函过来的(邀请函的券或者点击意见反馈买券) 2是提前点餐 3是商家APP分享的或者短信的链接 4好友赠送的券 5充值赠送的券,不显示按钮
rid: options.rid ? options.rid : '',
activity_id:options.activity_id || '',
}
... ... @@ -55,7 +58,7 @@ Page({
url: '/pages/me/wananchi'
})
},
// 提交订单
// 提交订单(免费券)
submitOrder: util.throttle(function () {
if (this.data.detail.aexpiration && this.data.detail.aexpiration.valid_forever != '1' && (this.data.dataStr > (this.data.detail.etime * 1))) {
return wx.showToast({
... ... @@ -66,7 +69,7 @@ Page({
})
}
// is_type 1店铺优惠券 需要判断优惠券剩余数量 2个人优惠券不需要判断数量 3免费券 4付费券
if (this.data.detail.grant_last == '0' && this.data.detail.is_type == '3') {
if (this.data.detail.grant_last <= '0' && this.data.detail.is_type == '3') {
return wx.showToast({
title: '您来晚了,当前优惠券已经售罄,请与商家联系!',
duration: 2000,
... ... @@ -94,6 +97,84 @@ Page({
closeCouponModal() {
this.myModal.closeModal()
},
// 提交订单(付费券)
submitOrderTwo: util.throttle(function () {
if(this.data.dataStr>(this.data.detail.etime*1)){
return wx.showToast({
title:'优惠券已过期,不可购买!',
duration:2000,
mask:true,
icon:'none'
})
}
if(this.data.num && !/(^[1-9]\d*$)/.test(this.data.num)){
return wx.showToast({
title:'请输入正确的购买数量',
duration:2000,
mask:true,
icon:'none'
})
}
// is_type 1店铺优惠券 需要判断优惠券剩余数量 2个人优惠券不需要判断数量
if(this.data.detail.grant_last=='0' && this.data.detail.is_type=='1'){
return wx.showToast({
title:'您来晚了,当前优惠券已经售罄,请与商家联系!',
duration:2000,
mask:true,
icon:'none'
})
}
// is_type 1店铺优惠券 需要判断优惠券剩余数量 2个人优惠券不需要判断数量
if(this.data.detail.grant_last && (this.data.detail.grant_last*1)<(this.data.num*1) && this.data.detail.is_type=='1'){
return wx.showToast({
title:'优惠券剩余数量不足!',
duration:2000,
mask:true,
icon:'none'
})
}
if(this.data.num=='0'){
return wx.showToast({
title:'最少需要购买一个!',
duration:2000,
mask:true,
icon:'none'
})
}
console.log('oidoid',this.data.opt.oid);
let detail=this.data.detail
detail.name=this.data.seller.sellername;
detail.oid=this.data.opt.oid;
App.Activity.CreateNewRechargeOrder({
recharge_id:this.data.opt.id,
sellerid:this.data.opt.sid,
number:this.data.num,
price:this.data.detail.price,
type:'1',
}).then(res=>{
console.log(res);
if(res.ret=='200'){
let totalize=this.data.totalize*1;
if(totalize==0){
util.toast('购买成功','none');
wx.reLaunch({
url: '/pages/me/coupon_news'
})
return
}
// 跳转到支付页,types传参 1邀请函 2提前点餐 3商家端app分享
wx.navigateTo({
url: `./confirmPayment?sid=${this.data.opt.sid}&sellerName=${this.data.seller.sellername}&oid=${this.data.opt.oid}&rid=${this.data.opt.rid?this.data.opt.rid:''}&type=1&detail=${JSON.stringify(detail)}&combine_out_trade_no=${res.data.combine_out_trade_no}&totalize=${this.data.totalize}&types=${this.data.opt.types}`,
})
}else{
wx.showToast({
title:res.msg,
duration:2000,
mask:true
})
}
})
}, 3000),
// 领券
getActivityCouponFun(type){
let detail = this.data.detail
... ... @@ -132,9 +213,12 @@ Page({
id: this.data.opt.id
}).then(res => {
if (res.data.length > 0) {
let couponType = '';
let detail = res.data[0];
let exp_date = util.determine(detail.exp_date);
detail.arule = detail.arule ? util.determine(detail.arule) : '';
detail.use = detail.use ? util.determine(detail.use) : '';
detail.exp_date = exp_date;
detail.expiration_date = detail.expiration_date ? util.determine(detail.expiration_date) : '';
detail.aexpiration = detail.aexpiration ? util.determine(detail.aexpiration) : '';
detail.cdate = detail.cdate * 1;
... ... @@ -175,16 +259,73 @@ Page({
detail.noonText = noon;
detail.nigText = nig;
}
if(detail.is_type!='3'){
detail.useStime = util.unixtoTime(detail.stime, 'YYYY-MM-DD');
detail.useEtime = util.unixtoTime(detail.etime, 'YYYY-MM-DD');
}
// is_cash 代金券 is_discount折扣券 is_dish菜品券 只有代金券有几折显示
if(detail.use){
couponType = detail.use.is_cash=='1'?'1':detail.use.is_discount=='1'?'2':detail.use.is_dish=='1'?'3':'1';
detail.use.images = detail.use.images ? util.determine(detail.use.images) : '';
}else{
couponType = '1'
}
if (detail.arule && detail.arule.is_share_lose == '0') {
wx.hideShareMenu()
}
let price = detail.price * 1;
let num = this.data.num * 1;
this.setData({
detail,
exp_date,
totalize: (price * num).toFixed(2),
couponType,
})
}
})
},
// 点击减号
subtraction() {
let price = this.data.detail.price * 1;
let num = this.data.num * 1;
let num1 = num - 1
if (num == '1') {
return false
}
this.setData({
num: num1,
totalize: (price * num1).toFixed(2)
})
},
// 点击加号
addition() {
let price = this.data.detail.price * 1;
let num = this.data.num * 1;
let num1 = num + 1
this.setData({
num: num1,
totalize: (price * num1).toFixed(2)
})
},
// 输入事件
bindKeyNameInput(event){
let price = this.data.detail.price * 1;
const value = event.detail.value.replace(/\s+/g, "")*1;
if(value && /(^[1-9]\d*$)/.test(value)){
wx.hideToast()
this.setData({
num: value,
totalize: (price * value).toFixed(2)
})
}else{
wx.showToast({
title:'请输入正整数',
icon:'none',
duration:1000,
mask:true,
})
}
},
// 获取店铺名称
getSellerDetail() {
let that = this;
... ... @@ -335,7 +476,7 @@ Page({
let detail = this.data.detail;
detail.activity_id = res.data.length > 0 ? res.data[0].activity_id : '';
this.setData({
resultCoupon: res.data.length > 0 ? '1' : '0',
resultCoupon: res.data.length > 0 && detail.is_type == '3' ? '1' : '0',
})
}
})
... ...
<!--pack-activity/pack/receiveCoupon.wxml-->
<wxs src="../../utils/util.wxs" module="util" />
<nav>代金券详情</nav>
<nav>优惠券详情</nav>
<view class="top_box">
<image src="https://qn.colorcun.com/voucherIcon1.png" mode="" />
<view class="texts">
<image src="https://qn.colorcun.com/{{couponType=='1'?'voucherIcon1':couponType=='2'?'coupon2':'coupon3'}}.png" mode="" />
<view class="texts" wx:if="{{detail.is_type == '3'}}">
<view class="font32r textName">{{detail.aname}}</view>
<view class="font24r threshold">¥<text class="priceText">{{detail.price}}</text><text class="font28r" wx:if="{{detail.desc!='0'}}">满{{detail.desc}}元可用</text></view>
</view>
<view class="texts texts{{couponType}}" wx:if="{{detail.is_type != '3'}}">
<view class="flex-lr">
<view class="font28r textName">{{detail.aname}}</view>
<view class="font20r">¥<text class="font32r">{{detail.price}}</text></view>
</view>
<view class="flex-lr">
<view class="font20r threshold">
<text class="priceText font36r" wx:if="{{detail.use.discount}}">{{detail.use.discount}}折</text>
<text class="font20r" wx:else>¥<text class="priceText font36r">{{detail.price}}</text></text>
{{detail.desc}}
</view>
<!-- <view class="operation" wx:if="{{opt.types!='5'}}">
<image class="countimgs" src="https://qn.colorcun.com/WechatIMG699.png" bindtap="subtraction" />
<input type="number" model:value="{{num}}" bindinput="bindKeyNameInput" />
<image class="countimgs" src="https://qn.colorcun.com/WechatIMG698.png" bindtap="addition" mode="" />
</view> -->
</view>
</view>
<view class="font28r receive" wx:if="{{resultCoupon == '1'}}">已领取</view>
</view>
<view class="center_box">
<view class="centerMain dishMain" wx:if="{{couponType == '3' && detail.use}}">
<view class="title">
<image src="https://qn.colorcun.com/voucherUnion_6.png" mode="" />
<text class="font32r">菜品</text>
</view>
<text space="nbsp" class="info font28r">{{detail.use.dish}}</text>
<image wx:for="{{detail.use.images}}" src="{{item}}" mode="widthFix"/>
</view>
<view class="centerMain">
<view class="title">
<image src="https://qn.colorcun.com/voucherUnion_1.png" mode="" />
<text class="font32r">有效期</text>
</view>
<view class="info font28r" wx:if="{{detail.aexpiration.valid_forever == '0' && detail.useStime && detail.useEtime}}"><text>券有效期:</text>{{detail.useStime}} <text> 至 </text> {{detail.useEtime}}</view>
<view class="info font28r" wx:if="{{detail.aexpiration.valid_forever == '1'}}"><text>券有效期:</text> 永久有效</view>
<block wx:if="{{detail.is_type == '3'}}">
<view class="info font28r" wx:if="{{detail.aexpiration.valid_forever == '0' && detail.useStime && detail.useEtime}}"><text>券有效期:</text>{{detail.useStime}} <text> 至 </text> {{detail.useEtime}}</view>
<view class="info font28r" wx:if="{{detail.aexpiration.valid_forever == '1'}}"><text>券有效期:</text> 永久有效</view>
</block>
<block wx:else>
<view class="info font28r" wx:if="{{detail.useStime && detail.useEtime}}"><text>活动期限:</text>{{detail.useStime}} <text> 至 </text> {{detail.useEtime}}</view>
</block>
</view>
<view class="centerMain">
<view class="title" wx:if="{{detail.morText || detail.noonText || detail.nigText}}">
<view class="centerMain" wx:if="{{detail.morText || detail.noonText || detail.nigText}}">
<view class="title">
<image src="https://qn.colorcun.com/voucherUnion_2.png" mode="" />
<text class="font32r">不可用日期</text>
<text class="font32r">{{detail.is_type=='3'?'不':''}}可用日期</text>
</view>
<view wx:if="{{detail.morText}}" class="info font28r">{{detail.morText}}</view>
<view wx:if="{{detail.noonText}}" class="info font28r">{{detail.noonText}}</view>
<view wx:if="{{detail.nigText}}" class="info font28r">{{detail.nigText}}</view>
</view>
<view class="centerMain centerMain3" wx:if="{{detail.aexpiration}}">
<view class="centerMain" wx:if="{{detail.is_type!='3' && exp_date.is_none=='1'}}">
<view class="title">
<image src="https://qn.colorcun.com/voucherUnion_1.png" mode="" />
<text class="font32r">可用日期</text>
</view>
<view wx:if="{{exp_date.is_none=='1'}}" class="info font28r" >
无限制
</view>
</view>
<view class="centerMain centerMain3" wx:if="{{detail.aexpiration && detail.is_type == '3'}}">
<view class="title">
<image src="https://qn.colorcun.com/voucherUnion_3.png" mode="" />
<text class="font32r">使用规则</text>
... ... @@ -48,7 +88,16 @@
<view class="drop"></view>{{detail.arule.is_appointment == '1' ? '需要提前预约' : '不需要提前预约'}}
</view>
</view>
<view class="centerMain">
<view class="centerMain centerMain3" wx:if="{{exp_date && exp_date.is_birthday=='1' && detail.is_type != '3'}}">
<view class="title">
<image src="https://qn.colorcun.com/voucherUnion_3.png" mode="" />
<text class="font32r">使用限制</text>
</view>
<view class="info font28r">
顾客生日当天可用
</view>
</view>
<view class="centerMain" wx:if="{{detail.is_type == '3'}}">
<view class="title">
<image src="https://qn.colorcun.com/voucherUnion_4.png" mode="" />
<text class="font32r">分享规则</text>
... ... @@ -98,20 +147,30 @@
</view>
</view>
</view>
<view class="sharewidth" wx:if="{{resultCoupon == '0' || detail.arule.is_share_lose == '1'}}">
<button wx:if="{{detail.arule.is_share_lose == '1'}}" class="shareBtn" open-type="share">
<image src="https://qn.colorcun.com/voucherIcon2.png" mode="" />
<text class="font24r">分享</text>
</button>
<view class="btns">
<view class="btn1 font36r" wx:if="{{seller.is_online_reserve == '1'}}">
<navigator url="/pages/reserve/reserve?id={{opt.sid}}&activeTab=reserve" class="book-item-font second-book-button flex-cc font30r" style="position: relative;">预订包间</navigator>
</view>
<view class="btn font36r" wx:if="{{seller.is_online_reserve == '0' && seller.phone}}">
<view bindtap="callPhone">预订包间</view>
</view>
<view wx:if="{{resultCoupon == '0' && detail.grant_last>0}}" class="btn font36r" bindtap="submitOrder">领取到卡包</view>
</view>
<view class="sharewidth {{detail.is_type != '3'?'sharewidth1':''}}" wx:if="{{opt.types!='5' && (resultCoupon == '0' || detail.arule.is_share_lose == '1')}}">
<block wx:if="{{detail.is_type == '3'}}">
<button wx:if="{{detail.arule.is_share_lose == '1'}}" class="shareBtn" open-type="share">
<image src="https://qn.colorcun.com/voucherIcon2.png" mode="" />
<text class="font24r">分享</text>
</button>
<view class="btns">
<view class="btn1 font36r" wx:if="{{seller.is_online_reserve == '1'}}">
<navigator url="/pages/reserve/reserve?id={{opt.sid}}&activeTab=reserve" class="book-item-font second-book-button flex-cc font30r" style="position: relative;">预订包间</navigator>
</view>
<view class="btn font36r" wx:if="{{seller.is_online_reserve == '0' && seller.phone}}">
<view bindtap="callPhone">预订包间</view>
</view>
<view wx:if="{{resultCoupon == '0' && detail.grant_last>0}}" class="btn font36r" bindtap="submitOrder">领取到卡包</view>
</view>
</block>
<block wx:else>
<view class="leftBox">
<view class="news font24r">
合计<text class="font28r">¥<text class="priceInfo">{{totalize}}</text></text>
</view>
</view>
<button bindtap="submitOrderTwo" class="font32r {{(dataStr>(detail.etime*1) || detail.grant_last=='0' || (detail.grant_last && (detail.grant_last*1)<(num*1)))?'submitBtns btnsDisabled':'submitBtns'}}">提交订单</button>
</block>
</view>
<toast id="myToast"></toast>
<my-modal id="myModal" fadeStyle="slideUp" height="240px">
... ...
... ... @@ -26,6 +26,10 @@ page {
margin-right: 12rpx;
}
.texts2 .priceText {
font-size: 36rpx;
}
.top_box .texts {
flex: 1;
margin-left: 32rpx;
... ... @@ -70,7 +74,7 @@ page {
}
.centerMain {
margin-bottom: 40rpx;
margin-bottom: 30rpx;
}
.centerMain .drop {
... ... @@ -190,15 +194,15 @@ page {
}
#myModal .titleModal2 {
margin-top: 80%;
margin-top: 80%;
}
#myModal .titleModal3 {
margin-top: 60%;
margin-top: 60%;
}
#myModal .titleModal4 {
margin-top: 30%;
margin-top: 30%;
}
#myModal .mymodal {
... ... @@ -219,7 +223,7 @@ page {
.modalText1 {
color: #dfdfdf;
font-family: PingFang SC;
font-family: PingFang SC;
font-weight: 600;
font-size: 52rpx;
text-align: center;
... ... @@ -227,7 +231,7 @@ page {
.modalText2 {
color: #dfdfdf;
font-family: PingFang SC;
font-family: PingFang SC;
font-weight: 500;
text-align: center;
margin: 0 40rpx;
... ... @@ -306,11 +310,11 @@ page {
.info_name {
color: #000;
overflow: hidden;
word-break: break-all;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 1;
word-break: break-all;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 1;
font-weight: 600;
}
... ... @@ -326,4 +330,79 @@ page {
background: #FFE8D7;
color: #fb4e21;
border-radius: 4rpx;
}
.operation {
display: flex;
align-items: center;
border: 2rpx solid #CBCBCB;
border-radius: 198rpx;
height: 52rpx;
}
.operation input {
width: 64rpx;
border-left: 2rpx solid #CBCBCB;
border-right: 2rpx solid #CBCBCB;
border-radius: 10rpx;
text-align: center;
height: 52rpx;
}
.top_box .countimgs {
width: 32rpx;
height: 32rpx;
padding: 16rpx;
}
.dishMain .info {
display: flex;
flex-wrap: wrap;
justify-content: flex-start;
}
.dishMain image {
margin-bottom: 12rpx;
width: 100%;
}
.dishMain .title image {
width: 26rpx;
}
.leftBox {
display: flex;
align-items: center;
justify-content: space-between;
font-family: PingFang SC;
}
.news {
color: #000;
}
.news text {
color: #FD4D59;
}
.priceInfo {
font-weight: 600;
font-size: 60rpx;
}
.submitBtns {
margin: 0;
border-radius: 42rpx;
padding: 0 56rpx;
color: #fff;
background: linear-gradient(90deg, #ff4d11 0%, #fe7600 100%);
}
.btnsDisabled {
background: #999999 !important;
color: #fff !important;
}
.sharewidth1 {
justify-content: space-between;
}
\ No newline at end of file
... ...
... ... @@ -76,7 +76,7 @@
<view class="publicModule preferentialCoupon" wx:if="{{hasValueCertificate && coupon_dataList.length>0}}">
<image class="titleImg5" src="https://qn.colorcun.com/invitation10Title1.png" mode="" />
<block wx:for="{{coupon_dataList}}" wx:key="index" wx:for-index="index">
<navigator wx:if="{{item.resultCoupon == '1' || item.is_type != '3'}}" url="/pack-activity/pack/{{item.is_type == '3'?'receiveCoupon':'buyCoupon'}}?id={{item.id}}&name={{seller.name}}&use={{item.stringifyUse}}&sid={{seller.sid}}&oid={{detail.id}}&types=1&StyleType={{StyleType}}" hover-class="navigator-hover">
<navigator wx:if="{{item.resultCoupon == '1' || item.is_type != '3'}}" url="/pack-activity/pack/receiveCoupon?id={{item.id}}&sid={{seller.sid}}&oid={{detail.id}}&types=1&StyleType={{StyleType}}&types=1&StyleType={{StyleType}}" hover-class="navigator-hover">
<view class="preferentialItems">
<view class="itemLeft">
<text wx:if="{{item.discount!='0.00' && (item.use.is_cash=='1' || item.use.is_cash) && item.discount}}" class="discountText font20r">{{item.discount}}折</text>
... ...
... ... @@ -116,7 +116,7 @@
<!-- 优惠券 -->
<view class="preferentialCoupon" wx:if="{{activeTitle == '1'}}">
<block wx:for="{{coupon_dataList}}" wx:key="index" wx:for-index="index">
<navigator wx:if="{{item.resultCoupon == '1' || item.is_type != '3'}}" url="/pack-activity/pack/{{item.is_type == '3'?'receiveCoupon':'buyCoupon'}}?id={{item.id}}&name={{seller.name}}&use={{item.stringifyUse}}&sid={{seller.sid}}&oid={{detail.id}}&types=1&StyleType={{StyleType}}" hover-class="navigator-hover">
<navigator wx:if="{{item.resultCoupon == '1' || item.is_type != '3'}}" url="/pack-activity/pack/receiveCoupon?id={{item.id}}&sid={{seller.sid}}&oid={{detail.id}}&types=1&StyleType={{StyleType}}&types=1&StyleType={{StyleType}}" hover-class="navigator-hover">
<view class="preferentialItems">
<view class="itemLeft">
<text wx:if="{{item.discount!='0.00' && (item.use.is_cash=='1' || item.use.is_cash) && item.discount}}" class="discountText font24r">{{item.discount}}折</text>
... ...
... ... @@ -176,7 +176,7 @@
<block wx:if="{{modalType == '1'}}">
<view class="regionItem preferentialCoupon" slot="modalContent">
<block wx:for="{{coupon_dataList}}" wx:key="index" wx:for-index="index">
<navigator wx:if="{{item.resultCoupon == '1' || item.is_type != '3'}}" url="/pack-activity/pack/{{item.is_type == '3'?'receiveCoupon':'buyCoupon'}}?id={{item.id}}&name={{seller.name}}&use={{item.stringifyUse}}&sid={{seller.sid}}&oid={{detail.id}}&types=1&StyleType={{StyleType}}" hover-class="navigator-hover">
<navigator wx:if="{{item.resultCoupon == '1' || item.is_type != '3'}}" url="/pack-activity/pack/receiveCoupon?id={{item.id}}&sid={{seller.sid}}&oid={{detail.id}}&types=1&StyleType={{StyleType}}&types=1&StyleType={{StyleType}}" hover-class="navigator-hover">
<view class="preferentialItems">
<view class="itemLeft">
<text wx:if="{{item.discount!='0.00' && (item.use.is_cash=='1' || item.use.is_cash) && item.discount}}" class="discountText font20r">{{item.discount}}折</text>
... ...
... ... @@ -86,7 +86,7 @@
</block>
<view class="preferentialCoupon" wx:if="{{hasValueCertificate && marketing && coupon_dataList.length>0}}">
<block wx:for="{{coupon_dataList}}" wx:key="index" wx:for-index="index">
<navigator wx:if="{{item.resultCoupon == '1' || item.is_type != '3'}}" url="/pack-activity/pack/{{item.is_type == '3'?'receiveCoupon':'buyCoupon'}}?id={{item.id}}&name={{seller.name}}&use={{item.stringifyUse}}&sid={{seller.sid}}&oid={{detail.id}}&types=1&StyleType={{StyleType}}" hover-class="navigator-hover">
<navigator wx:if="{{item.resultCoupon == '1' || item.is_type != '3'}}" url="/pack-activity/pack/receiveCoupon?id={{item.id}}&sid={{seller.sid}}&oid={{detail.id}}&types=1&StyleType={{StyleType}}&types=1&StyleType={{StyleType}}" hover-class="navigator-hover">
<view class="preferentialItems">
<view class="itemLeft">
<text wx:if="{{item.discount!='0.00' && (item.use.is_cash=='1' || item.use.is_cash) && item.discount}}" class="discountText font24r">{{item.discount}}折</text>
... ...
... ... @@ -92,7 +92,7 @@
</view>
<view class="preferentialCoupon" wx:if="{{hasValueCertificate && marketing && coupon_dataList.length>0}}">
<block wx:for="{{coupon_dataList}}" wx:key="index" wx:for-index="index">
<navigator wx:if="{{item.resultCoupon == '1' || item.is_type != '3'}}" url="/pack-activity/pack/{{item.is_type == '3'?'receiveCoupon':'buyCoupon'}}?id={{item.id}}&name={{seller.name}}&use={{item.stringifyUse}}&sid={{seller.sid}}&oid={{detail.id}}&types=1&StyleType={{StyleType}}" hover-class="navigator-hover">
<navigator wx:if="{{item.resultCoupon == '1' || item.is_type != '3'}}" url="/pack-activity/pack/receiveCoupon?id={{item.id}}&sid={{seller.sid}}&oid={{detail.id}}&types=1&StyleType={{StyleType}}&types=1&StyleType={{StyleType}}" hover-class="navigator-hover">
<view class="preferentialItems">
<view class="itemLeft">
<text wx:if="{{item.discount!='0.00' && (item.use.is_cash=='1' || item.use.is_cash) && item.discount}}" class="discountText font24r">{{item.discount}}折</text>
... ...
... ... @@ -75,7 +75,7 @@
</view>
<view class="preferentialCoupon" wx:if="{{hasValueCertificate && marketing && coupon_dataList.length>0}}">
<block wx:for="{{coupon_dataList}}" wx:key="index" wx:for-index="index">
<navigator wx:if="{{item.resultCoupon == '1' || item.is_type != '3'}}" url="/pack-activity/pack/{{item.is_type == '3'?'receiveCoupon':'buyCoupon'}}?id={{item.id}}&name={{seller.name}}&use={{item.stringifyUse}}&sid={{seller.sid}}&oid={{detail.id}}&types=1&StyleType={{StyleType}}" hover-class="navigator-hover">
<navigator wx:if="{{item.resultCoupon == '1' || item.is_type != '3'}}" url="/pack-activity/pack/receiveCoupon?id={{item.id}}&sid={{seller.sid}}&oid={{detail.id}}&types=1&StyleType={{StyleType}}&types=1&StyleType={{StyleType}}" hover-class="navigator-hover">
<view class="preferentialItems">
<view class="itemLeft">
<text wx:if="{{item.discount!='0.00' && (item.use.is_cash=='1' || item.use.is_cash) && item.discount}}" class="discountText font24r">{{item.discount}}折</text>
... ...
... ... @@ -73,7 +73,7 @@
</view>
<view class="preferentialCoupon" wx:if="{{hasValueCertificate && marketing && coupon_dataList.length>0}}">
<block wx:for="{{coupon_dataList}}" wx:key="index" wx:for-index="index">
<navigator wx:if="{{item.resultCoupon == '1' || item.is_type != '3'}}" url="/pack-activity/pack/{{item.is_type == '3'?'receiveCoupon':'buyCoupon'}}?id={{item.id}}&name={{seller.name}}&use={{item.stringifyUse}}&sid={{seller.sid}}&oid={{detail.id}}&types=1&StyleType={{StyleType}}" hover-class="navigator-hover">
<navigator wx:if="{{item.resultCoupon == '1' || item.is_type != '3'}}" url="/pack-activity/pack/receiveCoupon?id={{item.id}}&sid={{seller.sid}}&oid={{detail.id}}&types=1&StyleType={{StyleType}}&types=1&StyleType={{StyleType}}" hover-class="navigator-hover">
<view class="preferentialItems">
<view class="itemLeft">
<text wx:if="{{item.discount!='0.00' && (item.use.is_cash=='1' || item.use.is_cash) && item.discount}}" class="discountText font24r">{{item.discount}}折</text>
... ...
... ... @@ -95,7 +95,7 @@
</view>
<view class="preferentialCoupon" wx:if="{{hasValueCertificate && marketing && coupon_dataList.length>0}}">
<block wx:for="{{coupon_dataList}}" wx:key="index" wx:for-index="index">
<navigator wx:if="{{item.resultCoupon == '1' || item.is_type != '3'}}" url="/pack-activity/pack/{{item.is_type == '3'?'receiveCoupon':'buyCoupon'}}?id={{item.id}}&name={{seller.name}}&use={{item.stringifyUse}}&sid={{seller.sid}}&oid={{detail.id}}&types=1&StyleType={{StyleType}}" hover-class="navigator-hover">
<navigator wx:if="{{item.resultCoupon == '1' || item.is_type != '3'}}" url="/pack-activity/pack/receiveCoupon?id={{item.id}}&sid={{seller.sid}}&oid={{detail.id}}&types=1&StyleType={{StyleType}}&types=1&StyleType={{StyleType}}" hover-class="navigator-hover">
<view class="preferentialItems">
<view class="itemLeft">
<text wx:if="{{item.discount!='0.00' && (item.use.is_cash=='1' || item.use.is_cash) && item.discount}}" class="discountText font24r">{{item.discount}}折</text>
... ...
... ... @@ -88,7 +88,7 @@
</view>
<view class="preferentialCoupon" wx:if="{{hasValueCertificate && marketing && coupon_dataList.length>0}}">
<block wx:for="{{coupon_dataList}}" wx:key="index" wx:for-index="index">
<navigator wx:if="{{item.resultCoupon == '1' || item.is_type != '3'}}" url="/pack-activity/pack/{{item.is_type == '3'?'receiveCoupon':'buyCoupon'}}?id={{item.id}}&name={{seller.name}}&use={{item.stringifyUse}}&sid={{seller.sid}}&oid={{detail.id}}&types=1&StyleType={{StyleType}}" hover-class="navigator-hover">
<navigator wx:if="{{item.resultCoupon == '1' || item.is_type != '3'}}" url="/pack-activity/pack/receiveCoupon?id={{item.id}}&sid={{seller.sid}}&oid={{detail.id}}&types=1&StyleType={{StyleType}}&types=1&StyleType={{StyleType}}" hover-class="navigator-hover">
<view class="preferentialItems">
<view class="itemLeft">
<text wx:if="{{item.discount!='0.00' && (item.use.is_cash=='1' || item.use.is_cash) && item.discount}}" class="discountText font24r">{{item.discount}}折</text>
... ...
... ... @@ -85,7 +85,7 @@
</view>
<view class="preferentialCoupon" wx:if="{{hasValueCertificate && marketing && coupon_dataList.length>0}}">
<block wx:for="{{coupon_dataList}}" wx:key="index" wx:for-index="index">
<navigator wx:if="{{item.resultCoupon == '1' || item.is_type != '3'}}" url="/pack-activity/pack/{{item.is_type == '3'?'receiveCoupon':'buyCoupon'}}?id={{item.id}}&name={{seller.name}}&use={{item.stringifyUse}}&sid={{seller.sid}}&oid={{detail.id}}&types=1&StyleType={{StyleType}}" hover-class="navigator-hover">
<navigator wx:if="{{item.resultCoupon == '1' || item.is_type != '3'}}" url="/pack-activity/pack/receiveCoupon?id={{item.id}}&sid={{seller.sid}}&oid={{detail.id}}&types=1&StyleType={{StyleType}}&types=1&StyleType={{StyleType}}" hover-class="navigator-hover">
<view class="preferentialItems">
<view class="itemLeft">
<text wx:if="{{item.discount!='0.00' && (item.use.is_cash=='1' || item.use.is_cash) && item.discount}}" class="discountText font24r">{{item.discount}}折</text>
... ...
... ... @@ -90,7 +90,7 @@
</view>
<view class="preferentialCoupon" wx:if="{{hasValueCertificate && marketing && coupon_dataList.length>0}}">
<block wx:for="{{coupon_dataList}}" wx:key="index" wx:for-index="index">
<navigator wx:if="{{item.resultCoupon == '1' || item.is_type != '3'}}" url="/pack-activity/pack/{{item.is_type == '3'?'receiveCoupon':'buyCoupon'}}?id={{item.id}}&name={{seller.name}}&use={{item.stringifyUse}}&sid={{seller.sid}}&oid={{detail.id}}&types=1&StyleType={{StyleType}}" hover-class="navigator-hover">
<navigator wx:if="{{item.resultCoupon == '1' || item.is_type != '3'}}" url="/pack-activity/pack/receiveCoupon?id={{item.id}}&sid={{seller.sid}}&oid={{detail.id}}&types=1&StyleType={{StyleType}}&types=1&StyleType={{StyleType}}" hover-class="navigator-hover">
<view class="preferentialItems">
<view class="itemLeft">
<text wx:if="{{item.discount!='0.00' && (item.use.is_cash=='1' || item.use.is_cash) && item.discount}}" class="discountText font24r">{{item.discount}}折</text>
... ...
... ... @@ -93,13 +93,11 @@ Page({
if (options.coupon == '1' && options.price * 1 > 0) {
let url = util.http_build_query({
id: options.couponId,
name: options.sellerName,
oid: options.oid,
sid: options.sellid,
types: '1',
StyleType:this.data.StyleType,
use: options.use ? JSON.stringify(options.use) : '',
}, '/pack-activity/pack/buyCoupon')
}, '/pack-activity/pack/receiveCoupon')
wx.hideLoading()
wx.redirectTo({
url
... ...
... ... @@ -6,7 +6,7 @@
<view class="sign"></view><text class="font32r">专属优惠券</text>
</view>
<block wx:for="{{coupon_dataList}}" wx:key="index" wx:for-index="index">
<navigator wx:if="{{item.resultCoupon == '1' || item.is_type != '3'}}" url="/pack-activity/pack/{{item.is_type == '3'?'receiveCoupon':'buyCoupon'}}?id={{item.id}}&name={{seller.name}}&use={{item.stringifyUse}}&sid={{seller.sid}}&oid={{options.id}}&types=1&StyleType={{StyleType}}" hover-class="navigator-hover">
<navigator wx:if="{{item.resultCoupon == '1' || item.is_type != '3'}}" url="/pack-activity/pack/receiveCoupon?id={{item.id}}&sid={{seller.sid}}&oid={{options.id}}&types=1&StyleType={{StyleType}}" hover-class="navigator-hover">
<view class="couponWrap">
<view class="itemLeft">
<text wx:if="{{item.discount!='0.00' && (item.use.is_cash=='1' || item.use.is_cash) && item.discount}}" class="discountText font24r">{{item.discount}}折</text>
... ...
... ... @@ -21,7 +21,7 @@
</view>
<view class="preferential" wx:if="{{hasValueCertificate && marketing && coupon_dataList.length>0}}">
<block wx:for="{{coupon_dataList}}" wx:key="index" wx:for-index="index">
<navigator wx:if="{{item.resultCoupon == '1' || item.is_type != '3'}}" url="/pack-activity/pack/{{item.is_type == '3'?'receiveCoupon':'buyCoupon'}}?id={{item.id}}&name={{seller.sellName}}&use={{item.stringifyUse}}&sid={{sid}}&types=3&StyleType={{StyleType}}" hover-class="navigator-hover">
<navigator wx:if="{{item.resultCoupon == '1' || item.is_type != '3'}}" url="/pack-activity/pack/receiveCoupon?id={{item.id}}&sid={{sid}}&types=3&StyleType={{StyleType}}" hover-class="navigator-hover">
<view class="couponWrap">
<view class="itemLeft">
<text wx:if="{{item.discount!='0.00' && (item.use.is_cash=='1' || item.use.is_cash) && item.discount}}" class="discountText font24r">{{item.discount}}折</text>
... ...