Commit 27ba5793962510bc8652a1eb41070e6ef4726638

Authored by pengye
1 parent 47d1ad49

优惠券过期提醒、优惠券状态通知,加订阅消息提示

Showing 38 changed files with 333 additions and 140 deletions
... ... @@ -4,6 +4,8 @@ import App from '../../utils/api';
const subscribe=[
'ZwAkHfP8xUvBZKJn4VXsjRxUDTuCMjWqd8lTsdCPdks',//包厢预订通知 状态、预订门店、包厢名称、备注
'Pf1iEkCA8TnfeqEMkf-_338U78d4Js36pk6sbB0yem0',//消费金额反馈提醒 消费总额、包间名称、餐厅名称、预订日期
'oFnUM-ncr7zqHt7TeQRAGj5ifwqaR89t9yK7Bqj5bUU',//优惠券过期提醒
'0MfK1XrA3a-6hAeE_NHYTXedr5q4KnUlO3Q2fykjN8M',//优惠券状态通知
]
Component({
/**
... ... @@ -79,7 +81,7 @@ Component({
},800)
this.triggerEvent('event',{type:'success'})
}else{
util.toast('订阅失败,请在设置中打开','none')
util.toast('订阅失败,请在设置-消息管理中打开','none')
this.triggerEvent('event',{type:'fail'})
}
},
... ...
... ... @@ -107,7 +107,7 @@
总计:<text>¥{{totalize}}</text>元
</view>
<button
class="font32r {{(dataStr>(detail.etime*1) || detail.grant_last=='0' || (this.data.detail.grant_last && (detail.grant_last*1)<(num*1)))?'btns btnsDisabled':'btns'}}"
class="font32r {{(dataStr>(detail.etime*1) || detail.grant_last=='0' || (detail.grant_last && (detail.grant_last*1)<(num*1)))?'btns btnsDisabled':'btns'}}"
bindtap="submitOrder">提交订单
</button>
</view>
\ No newline at end of file
... ...
... ... @@ -73,7 +73,9 @@
</view>
<view slot="modalContent">
<view class="couponInfo font24r">您到店扫码支付即可自动使用</view>
<view bindtap="closegiveCouponModal" class="couponBtn font36r">我知道了</view>
<subscribe ids="{{[2,3]}}" bindtap="closegiveCouponModal">
<view class="couponBtn font36r">我知道了</view>
</subscribe>
<view class="couponText font24r" bindtap="certificate">点击查看详情</view>
</view>
</my-modal>
\ No newline at end of file
... ...
... ... @@ -161,12 +161,18 @@ Page({
if(that.data.opt.types == '1'){
console.log('StyleType',this.data.StyleType);
let arr = [9, 10, 11, 12, 13, 14, 15, 16, 17];
let style =arr.includes(parseInt(this.data.StyleType))
let StyleType = this.data.StyleType;
let style =arr.includes(parseInt(StyleType))
if (!style) {
url = `/pack-invitation/pages/detail_owner_invitation${that.data.StyleType}?id=${that.data.opt.detail.oid}`;
url = `/pack-invitation/pages/detail_owner_invitation${StyleType}?id=${that.data.opt.detail.oid}`;
} else {
url = `/pack-invitation/pages/detail_owner_invitation9?id=${that.data.opt.detail.oid}`;
}
if(StyleType == '18' || StyleType == '21') url = `/pack-invitation/pages/detail_owner_invitation11?id=${that.data.opt.detail.oid}`;
if(StyleType == '19' || StyleType == '22') url = `/pack-invitation/pages/detail_owner_invitation12?id=${that.data.opt.detail.oid}`;
if(StyleType == '20') url = `/pack-invitation/pages/detail_owner_invitation10?id=${that.data.opt.detail.oid}`;
if(StyleType == '18' || StyleType == '19') url += '&bookType=1';
if(StyleType == '21' || StyleType == '22') url += '&bookType=2';
}
if (that.data.opt.types == '2') {
let data={}
... ... @@ -359,13 +365,19 @@ Page({
// 1 邀请函 2 提前点餐 3商家端分享
if (this.data.opt.types == '1') {
let arr = [9, 10, 11, 12, 13, 14, 15, 16, 17];
let StyleType = this.data.StyleType
let style =arr.includes(parseInt(this.data.StyleType))
let url = '';
if (!style) {
url = `/pack-invitation/pages/detail_owner_invitation${this.data.StyleType}?id=${this.data.opt.detail.oid}`;
url = `/pack-invitation/pages/detail_owner_invitation${StyleType}?id=${this.data.opt.detail.oid}`;
} else {
url = `/pack-invitation/pages/detail_owner_invitation9?id=${this.data.opt.detail.oid}`;
}
if(StyleType == '18' || StyleType == '21') url = `/pack-invitation/pages/detail_owner_invitation11?id=${this.data.opt.detail.oid}`;
if(StyleType == '19' || StyleType == '22') url = `/pack-invitation/pages/detail_owner_invitation12?id=${this.data.opt.detail.oid}`;
if(StyleType == '20') url = `/pack-invitation/pages/detail_owner_invitation10?id=${this.data.opt.detail.oid}`;
if(StyleType == '18' || StyleType == '19') url += '&bookType=1';
if(StyleType == '21' || StyleType == '22') url += '&bookType=2';
return wx.reLaunch({
url
})
... ...
... ... @@ -4,6 +4,7 @@
"navigationBarTextStyle": "black",
"usingComponents": {
"nav": "/components/nav/nav",
"my-modal": "/components/modal/modal"
"my-modal": "/components/modal/modal",
"subscribe": "/components/userinfo/subscribe"
}
}
\ No newline at end of file
... ...
... ... @@ -84,7 +84,9 @@
<view class="font28r publicity" bindtap="wananchi">关注<text class="bold_box">周到安排</text>公众号,及时获取更多优惠券动态<view class="more" style="margin-left: 20rpx;"></view>
</view>
</view>
<button class="font32r btnsPay" bindtap="certificate">完成</button>
<subscribe ids="{{[2,3]}}" bindtap="certificate">
<button class="font32r btnsPay">完成</button>
</subscribe>
</view>
</view>
</my-modal>
\ No newline at end of file
... ...
... ... @@ -4,6 +4,7 @@
"usingComponents": {
"nav": "/components/nav/nav",
"my-modal": "/components/modal/modal",
"toast": "/components/toast/index"
"toast": "/components/toast/index",
"subscribe": "/components/userinfo/subscribe"
}
}
\ No newline at end of file
... ...
... ... @@ -160,7 +160,11 @@
<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>
<block wx:if="{{resultCoupon == '0' && detail.grant_last>0}}">
<subscribe ids="{{[2,3]}}" bindtap="submitOrder">
<view class="btn font36r">领取到卡包</view>
</subscribe>
</block>
</view>
</block>
<block wx:else>
... ...
... ... @@ -5,6 +5,7 @@
"nav": "/components/nav/nav",
"painter":"/components/painter/painter",
"my-modal": "/components/modal/modal",
"scroll-number": "/components/scroll-number/index"
"scroll-number": "/components/scroll-number/index",
"subscribe": "/components/userinfo/subscribe"
}
}
\ No newline at end of file
... ...
... ... @@ -329,7 +329,9 @@
</view>
</view> -->
<view class="couponInfo font24r">您到店扫码支付即可自动使用</view>
<view bindtap="closeCouponModal" class="couponBtn font36r">我知道了</view>
<subscribe ids="{{[2,3]}}" bindtap="closeCouponModal">
<view class="couponBtn font36r">我知道了</view>
</subscribe>
<view class="couponText font24r" bindtap="gotoSellerGift" data-form="2">查看更多</view>
</view>
</my-modal>
\ No newline at end of file
... ...
... ... @@ -5,6 +5,7 @@
"nav": "/components/nav/nav",
"painter":"/components/painter/painter",
"my-modal": "/components/modal/modal",
"scroll-number": "/components/scroll-number/index"
"scroll-number": "/components/scroll-number/index",
"subscribe": "/components/userinfo/subscribe"
}
}
\ No newline at end of file
... ...
... ... @@ -496,7 +496,9 @@
</view>
</view> -->
<view class="couponInfo font24r">您到店扫码支付即可自动使用</view>
<view bindtap="closeCouponModal" class="couponBtn font36r">我知道了</view>
<subscribe ids="{{[2,3]}}" bindtap="closeCouponModal">
<view class="couponBtn font36r">我知道了</view>
</subscribe>
<view class="couponText font24r" bindtap="gotoSellerGift" data-form="2">查看更多</view>
</view>
</my-modal>
\ No newline at end of file
... ...
... ... @@ -5,6 +5,7 @@
"nav": "/components/nav/nav",
"painter": "/components/painter/painter",
"my-modal": "/components/modal/modal",
"scroll-number": "/components/scroll-number/index"
"scroll-number": "/components/scroll-number/index",
"subscribe": "/components/userinfo/subscribe"
}
}
\ No newline at end of file
... ...
... ... @@ -421,7 +421,9 @@
</view>
</view> -->
<view class="couponInfo font24r">您到店扫码支付即可自动使用</view>
<view bindtap="closeCouponModal" class="couponBtn font36r">我知道了</view>
<subscribe ids="{{[2,3]}}" bindtap="closeCouponModal">
<view class="couponBtn font36r">我知道了</view>
</subscribe>
<view class="couponText font24r" bindtap="gotoSellerGift" data-form="2">查看更多</view>
</view>
</my-modal>
\ No newline at end of file
... ...
... ... @@ -7,6 +7,7 @@
"painter":"/components/painter/painter",
"titleStyle":"/components/titleStyle/titleStyle",
"my-modal": "/components/modal/modal",
"scroll-number": "/components/scroll-number/index"
"scroll-number": "/components/scroll-number/index",
"subscribe": "/components/userinfo/subscribe"
}
}
\ No newline at end of file
... ...
... ... @@ -371,7 +371,9 @@
</view>
</view> -->
<view class="couponInfo font24r">您到店扫码支付即可自动使用</view>
<view bindtap="closeCouponModal" class="couponBtn font36r">我知道了</view>
<subscribe ids="{{[2,3]}}" bindtap="closeCouponModal">
<view class="couponBtn font36r">我知道了</view>
</subscribe>
<view class="couponText font24r" bindtap="gotoSellerGift" data-form="2">查看更多</view>
</view>
</my-modal>
\ No newline at end of file
... ...
... ... @@ -7,6 +7,7 @@
"painter":"/components/painter/painter",
"titleStyle":"/components/titleStyle/titleStyle",
"my-modal": "/components/modal/modal",
"scroll-number": "/components/scroll-number/index"
"scroll-number": "/components/scroll-number/index",
"subscribe": "/components/userinfo/subscribe"
}
}
\ No newline at end of file
... ...
... ... @@ -376,7 +376,9 @@
</view>
</view> -->
<view class="couponInfo font24r">您到店扫码支付即可自动使用</view>
<view bindtap="closeCouponModal" class="couponBtn font36r">我知道了</view>
<subscribe ids="{{[2,3]}}" bindtap="closeCouponModal">
<view class="couponBtn font36r">我知道了</view>
</subscribe>
<view class="couponText font24r" bindtap="gotoSellerGift" data-form="2">查看更多</view>
</view>
</my-modal>
\ No newline at end of file
... ...
... ... @@ -7,6 +7,7 @@
"painter":"/components/painter/painter",
"titleStyle":"/components/titleStyle/titleStyle",
"my-modal": "/components/modal/modal",
"scroll-number": "/components/scroll-number/index"
"scroll-number": "/components/scroll-number/index",
"subscribe": "/components/userinfo/subscribe"
}
}
\ No newline at end of file
... ...
... ... @@ -359,7 +359,9 @@
</view>
</view> -->
<view class="couponInfo font24r">您到店扫码支付即可自动使用</view>
<view bindtap="closeCouponModal" class="couponBtn font36r">我知道了</view>
<subscribe ids="{{[2,3]}}" bindtap="closeCouponModal">
<view class="couponBtn font36r">我知道了</view>
</subscribe>
<view class="couponText font24r" bindtap="gotoSellerGift" data-form="2">查看更多</view>
</view>
</my-modal>
\ No newline at end of file
... ...
... ... @@ -7,6 +7,7 @@
"painter":"/components/painter/painter",
"titleStyle":"/components/titleStyle/titleStyle",
"my-modal": "/components/modal/modal",
"scroll-number": "/components/scroll-number/index"
"scroll-number": "/components/scroll-number/index",
"subscribe": "/components/userinfo/subscribe"
}
}
\ No newline at end of file
... ...
... ... @@ -358,7 +358,9 @@
</view>
</view> -->
<view class="couponInfo font24r">您到店扫码支付即可自动使用</view>
<view bindtap="closeCouponModal" class="couponBtn font36r">我知道了</view>
<subscribe ids="{{[2,3]}}" bindtap="closeCouponModal">
<view class="couponBtn font36r">我知道了</view>
</subscribe>
<view class="couponText font24r" bindtap="gotoSellerGift" data-form="2">查看更多</view>
</view>
</my-modal>
\ No newline at end of file
... ...
... ... @@ -6,6 +6,7 @@
"nav": "/components/nav/nav",
"painter":"/components/painter/painter",
"my-modal": "/components/modal/modal",
"scroll-number": "/components/scroll-number/index"
"scroll-number": "/components/scroll-number/index",
"subscribe": "/components/userinfo/subscribe"
}
}
\ No newline at end of file
... ...
... ... @@ -346,7 +346,9 @@
</view>
</view> -->
<view class="couponInfo font24r">您到店扫码支付即可自动使用</view>
<view bindtap="closeCouponModal" class="couponBtn font36r">我知道了</view>
<subscribe ids="{{[2,3]}}" bindtap="closeCouponModal">
<view class="couponBtn font36r">我知道了</view>
</subscribe>
<view class="couponText font24r" bindtap="gotoSellerGift" data-form="2">查看更多</view>
</view>
</my-modal>
\ No newline at end of file
... ...
... ... @@ -7,6 +7,7 @@
"painter":"/components/painter/painter",
"titleStyle":"/components/titleStyle/titleStyle",
"my-modal": "/components/modal/modal",
"scroll-number": "/components/scroll-number/index"
"scroll-number": "/components/scroll-number/index",
"subscribe": "/components/userinfo/subscribe"
}
}
\ No newline at end of file
... ...
... ... @@ -371,7 +371,9 @@
</view>
</view> -->
<view class="couponInfo font24r">您到店扫码支付即可自动使用</view>
<view bindtap="closeCouponModal" class="couponBtn font36r">我知道了</view>
<subscribe ids="{{[2,3]}}" bindtap="closeCouponModal">
<view class="couponBtn font36r">我知道了</view>
</subscribe>
<view class="couponText font24r" bindtap="gotoSellerGift" data-form="2">查看更多</view>
</view>
</my-modal>
\ No newline at end of file
... ...
... ... @@ -7,6 +7,7 @@
"painter":"/components/painter/painter",
"titleStyle":"/components/titleStyle/titleStyle",
"my-modal": "/components/modal/modal",
"scroll-number": "/components/scroll-number/index"
"scroll-number": "/components/scroll-number/index",
"subscribe": "/components/userinfo/subscribe"
}
}
\ No newline at end of file
... ...
... ... @@ -370,7 +370,9 @@
</view>
</view> -->
<view class="couponInfo font24r">您到店扫码支付即可自动使用</view>
<view bindtap="closeCouponModal" class="couponBtn font36r">我知道了</view>
<subscribe ids="{{[2,3]}}" bindtap="closeCouponModal">
<view class="couponBtn font36r">我知道了</view>
</subscribe>
<view class="couponText font24r" bindtap="gotoSellerGift" data-form="2">查看更多</view>
</view>
</my-modal>
\ No newline at end of file
... ...
... ... @@ -6,6 +6,7 @@
"painter":"/components/painter/painter",
"titleStyle":"/components/titleStyle/titleStyle",
"my-modal": "/components/modal/modal",
"scroll-number": "/components/scroll-number/index"
"scroll-number": "/components/scroll-number/index",
"subscribe": "/components/userinfo/subscribe"
}
}
\ No newline at end of file
... ...
... ... @@ -369,7 +369,9 @@
</view>
</view> -->
<view class="couponInfo font24r">您到店扫码支付即可自动使用</view>
<view bindtap="closeCouponModal" class="couponBtn font36r">我知道了</view>
<subscribe ids="{{[2,3]}}" bindtap="closeCouponModal">
<view class="couponBtn font36r">我知道了</view>
</subscribe>
<view class="couponText font24r" bindtap="gotoSellerGift" data-form="2">查看更多</view>
</view>
</my-modal>
\ No newline at end of file
... ...
... ... @@ -70,13 +70,19 @@ Page({
}).then(res => {
if(res.data && res.data.type){
let arr = [9, 10, 11, 12, 13, 14, 15, 16, 17];
let style =arr.includes(parseInt(res.data.type))
let StyleType = res.data.type
let style =arr.includes(parseInt(StyleType))
let url = '';
if (!style) {
url = `/pack-invitation/pages/detail_owner_invitation${res.data.type}?id=${this.detail.id}&hasInvitation=1&hasSellerShare=1&tplid=1`;
url = `/pack-invitation/pages/detail_owner_invitation${StyleType}?id=${this.detail.id}&hasInvitation=1&hasSellerShare=1&tplid=1`;
} else {
url = `/pack-invitation/pages/detail_owner_invitation9?id=${this.detail.id}&hasInvitation=1&hasSellerShare=1&tplid=1`;
}
if(StyleType == '18' || StyleType == '21') url = `/pack-invitation/pages/detail_owner_invitation11?id=${this.detail.id}&hasInvitation=1&hasSellerShare=1&tplid=1`;
if(StyleType == '19' || StyleType == '22') url = `/pack-invitation/pages/detail_owner_invitation12?id=${this.detail.id}&hasInvitation=1&hasSellerShare=1&tplid=1`;
if(StyleType == '20') url = `/pack-invitation/pages/detail_owner_invitation10?id=${this.detail.id}&hasInvitation=1&hasSellerShare=1&tplid=1`;
if(StyleType == '18' || StyleType == '19') url += '&bookType=1';
if(StyleType == '21' || StyleType == '22') url += '&bookType=2';
wx.navigateTo({
url
})
... ...
... ... @@ -146,10 +146,13 @@ Page({
if (opt.hasInvitation == 1 && configType) {
let style =arr.includes(parseInt(configType))
if (!style) {
url = '/pack-invitation/pages/detail_owner_invitation' + configType;
} else {
url = '/pack-invitation/pages/detail_owner_invitation9';
}
url = '/pack-invitation/pages/detail_owner_invitation' + configType;
} else {
url = '/pack-invitation/pages/detail_owner_invitation9';
}
if(configType == '18' || configType == '21') url = '/pack-invitation/pages/detail_owner_invitation11';
if(configType == '19' || configType == '22') url = '/pack-invitation/pages/detail_owner_invitation12';
if(configType == '20') url = '/pack-invitation/pages/detail_owner_invitation10';
} else {
url = '/pack-invitation/pages/detail_owner_invitation1';
}
... ... @@ -176,6 +179,8 @@ Page({
if(opt.uid && opt.uid!=''){
url+='&uid='+opt.uid;
}
if(configType == '18' || configType == '19') url += '&bookType=1';
if(configType == '21' || configType == '22') url += '&bookType=2';
console.log('wx.redirectTo', url, res);
this.redirectTo({url: url});
}).catch(res => {
... ...
... ... @@ -164,19 +164,93 @@ Page({
id
}).then(res => {
if (res.data.length > 0) {
let couponData = res.data[0]
couponData.use = couponData.use ? util.determine(couponData.use) : '';
couponData.exp_date = couponData.exp_date ? util.determine(couponData.exp_date) : '';
if ((couponData.use && (!couponData.use.is_cash || couponData.use.is_cash == '1'))) {
let cash = couponData.use.cash * 1;
let price = couponData.price * 1;
couponData.discount = cash != 0 ? ((price / cash) * 10).toFixed(1) : '';
let detail = res.data[0]
let data = detail.expiration_date ? util.determine(detail.expiration_date) : '';
detail.use = detail.use ? util.determine(detail.use) : '';
detail.exp_date = detail.exp_date ? util.determine(detail.exp_date) : '';
if ((detail.use && (!detail.use.is_cash || detail.use.is_cash == '1'))) {
let cash = detail.use.cash * 1;
let price = detail.price * 1;
detail.discount = cash != 0 ? ((price / cash) * 10).toFixed(1) : '';
}
detail.stringifyUse = detail.use ? JSON.stringify(detail.use) : '';
detail.arule = detail.arule ? util.determine(detail.arule) : '';
detail.expiration_date = detail.expiration_date ? util.determine(detail.expiration_date) : '';
detail.aexpiration = detail.aexpiration ? util.determine(detail.aexpiration) : '';
if ((detail.use && (!detail.use.is_cash || detail.use.is_cash == '1'))) {
let cash = detail.use.cash * 1;
let price = detail.price * 1;
detail.discount = cash != 0 ? ((price / cash) * 10).toFixed(1) : '';
}
let num = detail.grant_num*1-detail.grant_last*1;
if (num > 0) {
detail.receiveNumText = ''
if (num >= 0 && num <= 100) {
detail.receiveNumText = num.toString();
} else if (num >= 101 && num <= 199) {
detail.receiveNumText = '100+';
} else if (num >= 200 && num <= 299) {
detail.receiveNumText = '200+';
} else {
detail.receiveNumText = Math.floor(num / 100) * 100 + '+';
}
}
if(num == 0){
let str = detail.grant_num*1
detail.receiveNumText = ''
if (str >= 0 && str <= 100) {
detail.receiveNumText = str.toString();
} else if (str >= 101 && str <= 199) {
detail.receiveNumText = '100+';
} else if (str >= 200 && str <= 299) {
detail.receiveNumText = '200+';
} else {
detail.receiveNumText = Math.floor(str / 100) * 100 + '+';
}
}
if (detail.exp_date && detail.exp_date.week_data) {
let mor = this.hasConsecutiveSelect(detail.exp_date.week_data, '1').rArr.join('、')
let noon = this.hasConsecutiveSelect(detail.exp_date.week_data, '2').rArr.join('、')
let nig = this.hasConsecutiveSelect(detail.exp_date.week_data, '3').rArr.join('、')
if (mor) mor = '早餐:' + mor
if (noon) noon = '午餐:' + noon
if (nig) nig = '晚餐:' + nig
detail.morText = mor;
detail.noonText = noon;
detail.nigText = nig;
}
detail.resultCoupon = '1'; // 显示已领取
detail.cdate = detail.cdate * 1;
detail.useStime = '';
detail.useEtime = '';
let condition = detail.aexpiration
if (condition.valid_forever === '0' && condition.stime && condition.etime) {
detail.useStime = util.unixtoTime(condition.stime, 'YYYY-MM-DD');
detail.useEtime = util.unixtoTime(condition.etime, 'YYYY-MM-DD');
}
if (condition.valid_forever === '1') {
detail.foreverText = '永久有效';
}
if (condition.valid_forever === '0' && condition.today) {
let obj = this.setTimeRange(detail.cdate, 0, parseInt(condition.today) - 1);
detail.useStime = obj.useStime;
detail.useEtime = obj.useEtime;
}
if (condition.valid_forever === '0' && condition.tomorrow) {
let obj = this.setTimeRange(detail.cdate, 1, condition.tomorrow * 1);
detail.useStime = obj.useStime;
detail.useEtime = obj.useEtime;
}
if (condition.valid_forever === '0' && condition.sday && condition.eday) {
let obj = this.setTimeRange(detail.cdate, parseInt(condition.sday) - 1, parseInt(condition.eday) - 1);
detail.useStime = obj.useStime;
detail.useEtime = obj.useEtime;
}
// showCoupon 代表赠送的券没过有效期 && 是开启状态
couponData.showCoupon = (this.data.dataStr<(couponData.etime*1) && couponData.is_open=='1') ? '1' : '0';
console.log('邀请函--------------------评价赠送的优惠券',couponData);
detail.showCoupon = (((data.valid_forever == '0' && this.data.dataStr < (data.etime * 1)) || data.valid_forever == '1') && detail.is_open == '1') ? '1' : '0';
console.log('邀请函--------------------评价赠送的优惠券',detail);
this.setData({
couponData:res.data[0]
couponData:detail
})
}
})
... ...
... ... @@ -3,109 +3,133 @@
<nav id='nav'>商家有礼</nav>
<view class="box" wx:if="{{hasValueCertificate && coupon_dataList.length>0}}">
<view class="title" wx:if="{{options.form == '1'}}">
<view class="sign"></view><text class="font32r">专属优惠券</text>
<view class="sign"></view><text class="font28r">专属优惠券</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/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>
<view class="discountText1 font20r {{item.arule.is_accumulation == '1'?'discountText2':'discountText3'}}" wx:if="{{item.is_type == '3'}}">{{item.arule.is_accumulation == '1' ? '可' : '不可'}}叠加</view>
<view class="priceText" wx:if="{{item.price}}">
<view class="icons font24r">¥</view><text class="font48r">{{item.price}}</text>
</view>
<view class="icons font20r" wx:if="{{item.is_type == '3' && item.desc!='0'}}">消费满{{item.desc}}元可用</view>
<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>
<view class="discountText1 font20r {{item.arule.is_accumulation == '1'?'discountText2':'discountText3'}}" wx:if="{{item.is_type == '3'}}">{{item.arule.is_accumulation == '1' ? '可' : '不可'}}叠加</view>
<view class="priceText" wx:if="{{item.price}}">
<view class="icons font24r">¥</view><text class="font48r">{{item.price}}</text>
</view>
<view class="couponLine"></view>
<view class="itemRight">
<view class="btns">
<text class="font32r anameText">{{item.aname}}</text>
<block wx:if="{{item.is_type == '1' || item.is_type == '2'}}">
<text wx:if="{{item.exp_date.is_week=='1' || item.exp_date.is_week===true}}" class="bottom font24r">{{item.exp_date.week_show?item.exp_date.week_show+'可用':''}}{{item.desc?','+item.desc+'。':'。'}}</text>
<view wx:if="{{item.exp_date.is_none=='1' || item.exp_date.is_none===true}}" class="bottom font24r">
无限制{{item.desc?','+item.desc+'。':'。'}}
</view>
<view wx:if="{{item.exp_date.is_birthday=='1' || item.exp_date.is_birthday===true}}" class="bottom font24r">
会员生日当天可用{{item.desc?','+item.desc+'。':'。'}}
</view>
</block>
<block wx:if="{{item.is_type == '3' || item.is_type == '4'}}">
<view wx:if="{{(item.useStime && item.useEtime) || item.foreverText}}" class="bottom font24r">有效期:{{item.foreverText?item.foreverText : ''}}</view>
<view wx:if="{{item.useStime && item.useEtime}}" class="bottom font24r nodate">{{item.useStime}} 至 {{item.useEtime}}</view>
<view wx:if="{{item.morText || item.noonText || item.noonText}}" class="bottom font24r">不可用日期:</view>
<view wx:if="{{item.morText}}" class="bottom font24r nodate">{{item.morText}}</view>
<view wx:if="{{item.noonText}}" class="bottom font24r nodate">{{item.noonText}}</view>
<view wx:if="{{item.nigText}}" class="bottom font24r nodate">{{item.nigText}}</view>
<view wx:if="{{item.exp_date.week_show=='无'}}" class="bottom font24r">无使用时间限制</view>
<view wx:if="{{item.is_type == '4' && item.desc!='0'}}" class="bottom font24r">消费满{{item.desc}}元可用</view>
</block>
</view>
<view class="btnBox" wx:if="{{item.is_type == '3'}}" >
<view class="font24r orderingFood orderingFood1">已领取</view>
<view class="grantNum" wx:if="{{item.receiveNumText}}">
<view class="font24r">已被领取</view>
<view class="font24r"><text>{{item.receiveNumText}}</text>张</view>
<view class="icons font20r" wx:if="{{item.is_type == '3' && item.desc!='0'}}">消费满{{item.desc}}元可用</view>
</view>
<view class="couponLine"></view>
<view class="itemRight">
<view class="btns">
<text class="font32r anameText">{{item.aname}}</text>
<block wx:if="{{item.is_type == '1' || item.is_type == '2'}}">
<text wx:if="{{item.exp_date.is_week=='1' || item.exp_date.is_week===true}}" class="bottom font24r">{{item.exp_date.week_show?item.exp_date.week_show+'可用':''}}{{item.desc?','+item.desc+'。':'。'}}</text>
<view wx:if="{{item.exp_date.is_none=='1' || item.exp_date.is_none===true}}" class="bottom font24r">
无限制{{item.desc?','+item.desc+'。':'。'}}
</view>
<view wx:if="{{item.exp_date.is_birthday=='1' || item.exp_date.is_birthday===true}}" class="bottom font24r">
会员生日当天可用{{item.desc?','+item.desc+'。':'。'}}
</view>
</block>
<block wx:if="{{item.is_type == '3' || item.is_type == '4'}}">
<view wx:if="{{(item.useStime && item.useEtime) || item.foreverText}}" class="bottom font24r">有效期:{{item.foreverText?item.foreverText : ''}}</view>
<view wx:if="{{item.useStime && item.useEtime}}" class="bottom font24r nodate">{{item.useStime}} 至 {{item.useEtime}}</view>
<view wx:if="{{item.morText || item.noonText || item.noonText}}" class="bottom font24r">不可用日期:</view>
<view wx:if="{{item.morText}}" class="bottom font24r nodate">{{item.morText}}</view>
<view wx:if="{{item.noonText}}" class="bottom font24r nodate">{{item.noonText}}</view>
<view wx:if="{{item.nigText}}" class="bottom font24r nodate">{{item.nigText}}</view>
<view wx:if="{{item.exp_date.week_show=='无'}}" class="bottom font24r">无使用时间限制</view>
<view wx:if="{{item.is_type == '4' && item.desc!='0'}}" class="bottom font24r">消费满{{item.desc}}元可用</view>
</block>
</view>
<view class="btnBox" wx:if="{{item.is_type == '3'}}" >
<view class="font24r orderingFood orderingFood1">已领取</view>
<view class="grantNum" wx:if="{{item.receiveNumText}}">
<view class="font24r">已被领取</view>
<view class="font24r"><text>{{item.receiveNumText}}</text>张</view>
</view>
<view wx:if="{{item.is_type != '3'}}" class="font24r orderingFood">
立即抢购
</view>
</view>
<view wx:if="{{item.is_type != '3'}}" class="font24r orderingFood orderingFood2">
抢购
</view>
</view>
</view>
</navigator>
</block>
</view>
<view class="box" wx:if="{{options.form == '1' && hasValueRecharge && recharge_data && recharge_data.id}}">
<view class="title">
<view class="sign"></view><text class="font32r">会员充值优惠</text>
<view class="sign"></view><text class="font28r">会员充值优惠</text>
</view>
<navigator url="/pack-activity/pack/vipRecharge?id={{recharge_data.id}}&name={{seller.name}}&sid={{seller.sid}}&oid={{options.id}}&types=1&StyleType={{StyleType}}" hover-class="navigator-hover">
<view class="rechargeItems">
<view class="couponWrap">
<view class="itemLeft">
<view class="itemTop font36r">
{{recharge_data.rname}}
<view class="priceText" wx:if="{{recharge_data.recharge_money}}">
<view class="icons font24r">¥</view><text class="font48r">{{recharge_data.recharge_money}}</text>
</view>
<view class="itemBottom font24r" wx:if="{{priceInfo}}">
{{priceInfo}}{{(recharge_data.recharge_list.is_coupons=='0' && recharge_data.recharge_list.is_score=='0')?'。':';'}}
</view>
<view class="bottom font24r" wx:if="{{scoreInfo}}">
{{scoreInfo}}{{recharge_data.recharge_list.is_coupons=='0'?'。':';'}}
</view>
<view class="couponLine"></view>
<view class="itemRight">
<view class="btns">
<view class="bottom font24r" wx:if="{{priceInfo}}">
{{priceInfo}}{{(recharge_data.recharge_list.is_coupons=='0' && recharge_data.recharge_list.is_score=='0')?'。':';'}}
</view>
<view class="bottom font24r" wx:if="{{scoreInfo}}">
{{scoreInfo}}{{recharge_data.recharge_list.is_coupons=='0'?'。':';'}}
</view>
<view class="bottom font24r" wx:if="{{recharge_data.recharge_list.is_coupons=='1'}}">
{{recharge_data.recharge_list.is_coupons=='1'?'会员充值满'+recharge_data.recharge_money+'元赠送'+certificate:''}}。
</view>
</view>
<view class="bottom font24r" wx:if="{{recharge_data.recharge_list.is_coupons=='1'}}">
{{recharge_data.recharge_list.is_coupons=='1'?'会员充值满'+recharge_data.recharge_money+'元赠送'+certificate:''}}。
<view class="font24r orderingFood orderingFood2">
充值
</view>
</view>
<view class="font24r orderingFood">
充值
</view>
</view>
</navigator>
</view>
<!-- 启用评价 && 是否评价过 && 评价赠送优惠券 && 赠送的优惠券有数据-->
<view class="box" wx:if="{{options.form == '1' && is_comments=='1' && !is_user_comments && marketing.is_comments_coupon=='1' && couponData && couponData.showCoupon =='1'}}">
<view class="title">
<view class="sign"></view><text class="font32r">反馈有礼</text>
<view class="sign"></view><text class="font28r">反馈有礼</text>
</view>
<view class="preferentialItems" bindtap="evaluateFun">
<view class="couponWrap" bindtap="evaluateFun">
<view class="itemLeft">
<text wx:if="{{couponData.discount!='0.00' && (couponData.use.is_cash=='1' || couponData.use.is_cash) && couponData.discount}}" class="discountText font24r">{{couponData.discount}}折</text>
<view class="discountText1 font20r {{couponData.arule.is_accumulation == '1'?'discountText2':'discountText3'}}" wx:if="{{couponData.is_type == '3'}}">{{couponData.arule.is_accumulation == '1' ? '可' : '不可'}}叠加</view>
<view class="priceText" wx:if="{{couponData.price}}">
<text class="icons font40r">¥</text><text>{{couponData.price}}</text>
<view class="icons font24r">¥</view><text class="font48r">{{couponData.price}}</text>
</view>
<view class="icons font20r" wx:if="{{couponData.is_type == '3' && couponData.desc!='0'}}">消费满{{couponData.desc}}元可用</view>
</view>
<view class="couponLine"></view>
<view class="itemRight">
<view class="btns">
<text class="font40r">{{couponData.aname}}</text>
<view class="font24r orderingFood">
领取
</view>
</view>
<text wx:if="{{couponData.exp_date.is_week=='1' || couponData.exp_date.is_week===true}}" class="bottom font24r">{{couponData.exp_date.week_show?couponData.exp_date.week_show+'可用':''}}{{couponData.desc?','+couponData.desc+'。':'。'}}</text>
<view wx:if="{{couponData.exp_date.is_none=='1' || couponData.exp_date.is_none===true}}" class="bottom font24r">
无限制{{couponData.desc?','+couponData.desc+'。':'。'}}
<text class="font32r anameText">{{couponData.aname}}</text>
<block wx:if="{{couponData.is_type == '1' || couponData.is_type == '2'}}">
<text wx:if="{{couponData.exp_date.is_week=='1' || couponData.exp_date.is_week===true}}" class="bottom font24r">{{couponData.exp_date.week_show?couponData.exp_date.week_show+'可用':''}}{{couponData.desc?','+couponData.desc+'。':'。'}}</text>
<view wx:if="{{couponData.exp_date.is_none=='1' || couponData.exp_date.is_none===true}}" class="bottom font24r">
无限制{{couponData.desc?','+couponData.desc+'。':'。'}}
</view>
<view wx:if="{{couponData.exp_date.is_birthday=='1' || couponData.exp_date.is_birthday===true}}" class="bottom font24r">
会员生日当天可用{{couponData.desc?','+couponData.desc+'。':'。'}}
</view>
</block>
<block wx:if="{{couponData.is_type == '3' || couponData.is_type == '4'}}">
<view wx:if="{{(couponData.useStime && couponData.useEtime) || couponData.foreverText}}" class="bottom font24r">有效期:{{couponData.foreverText?couponData.foreverText : ''}}</view>
<view wx:if="{{couponData.useStime && couponData.useEtime}}" class="bottom font24r nodate">{{couponData.useStime}} 至 {{couponData.useEtime}}</view>
<view wx:if="{{couponData.morText || couponData.noonText || couponData.noonText}}" class="bottom font24r">不可用日期:</view>
<view wx:if="{{couponData.morText}}" class="bottom font24r nodate">{{couponData.morText}}</view>
<view wx:if="{{couponData.noonText}}" class="bottom font24r nodate">{{couponData.noonText}}</view>
<view wx:if="{{couponData.nigText}}" class="bottom font24r nodate">{{couponData.nigText}}</view>
<view wx:if="{{couponData.exp_date.week_show=='无'}}" class="bottom font24r">无使用时间限制</view>
<view wx:if="{{couponData.is_type == '4' && couponData.desc!='0'}}" class="bottom font24r">消费满{{couponData.desc}}元可用</view>
</block>
</view>
<view wx:if="{{couponData.exp_date.is_birthday=='1' || couponData.exp_date.is_birthday===true}}" class="bottom font24r">
会员生日当天可用{{couponData.desc?','+couponData.desc+'。':'。'}}
<view class="btnBox" wx:if="{{couponData.is_type == '3'}}" >
<view class="font24r orderingFood">免费领取</view>
<view class="grantNum" wx:if="{{couponData.receiveNumText}}">
<view class="font24r">已被领取</view>
<view class="font24r"><text>{{couponData.receiveNumText}}</text>张</view>
</view>
</view>
</view>
</view>
... ...
... ... @@ -4,31 +4,32 @@ page {
}
.box {
margin: 24rpx;
margin: 12rpx;
border-radius: 10rpx;
background: #fff;
padding: 40rpx 20rpx;
padding: 12rpx;
margin-bottom: 24rpx;
}
.title {
display: flex;
align-items: center;
border-bottom: 2rpx solid #dbdbdb;
padding: 0 0 12rpx 24rpx;
margin-bottom: 30rpx;
}
.sign {
width: 6rpx;
height: 30rpx;
border-radius: 16rpx;
background: #0143a3;
background: linear-gradient(90deg, #ff4d11 0%, #fe7600 100%);
}
.title text {
margin-left: 10rpx;
color: #000;
background: linear-gradient(90deg, #ff4d11 0%, #fe7600 100%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
font-weight: 600;
}
.couponWrap .nodate{
... ... @@ -50,7 +51,6 @@ page {
min-height: 160rpx;
padding-bottom: 10rpx;
border-radius: 20rpx;
border: 2rpx solid #ff7e06;
}
... ... @@ -93,7 +93,10 @@ page {
height: 44rpx;
width: max-content;
flex-shrink: 0;
background: linear-gradient(94.4deg, #f41919 2.72%, #ff7426 122.17%);
background: linear-gradient(90deg, #ff4d11 0%, #fe7600 100%);
}
.orderingFood2 {
width: 74rpx !important;
}
.couponWrap .icons {
color: #F6231B !important;
... ... @@ -252,7 +255,7 @@ page {
border-radius: 20rpx;
line-height: 44rpx;
height: 44rpx;
background: linear-gradient(95.61deg, #2186e2 0.55%, #054baa 130.76%);
background: linear-gradient(90deg, #ff4d11 0%, #fe7600 100%);
width: max-content;
flex-shrink: 0;
}
... ...
... ... @@ -6,6 +6,7 @@
"nav": "/components/nav/nav",
"titleStyle":"/components/titleStyle/titleStyle",
"my-modal": "/components/modal/modal",
"scroll-number": "/components/scroll-number/index"
"scroll-number": "/components/scroll-number/index",
"subscribe": "/components/userinfo/subscribe"
}
}
\ No newline at end of file
... ...
... ... @@ -253,6 +253,8 @@
</view>
</view> -->
<view class="couponInfo font24r">您到店扫码支付即可自动使用</view>
<view bindtap="closeCouponModal" class="couponBtn font36r">我知道了</view>
<subscribe ids="{{[2,3]}}" bindtap="closeCouponModal">
<view class="couponBtn font36r">我知道了</view>
</subscribe>
</view>
</my-modal>
\ No newline at end of file
... ...
... ... @@ -6,6 +6,41 @@
"miniprogram": {
"list": [
{
"name": "免费券付费券付款页",
"pathName": "pack-activity/pack/buyFreeCoupon",
"query": "sid=17948",
"launchMode": "default",
"scene": null
},
{
"name": "4352-----新邀请函入口页",
"pathName": "pages/customer/detail_owner_invitation_new",
"query": "id=1460829&uid=27201&hasSellerShare=1&paymentId=",
"launchMode": "default",
"scene": null
},
{
"name": "pack-cookbook/pages/favourableList",
"pathName": "pack-cookbook/pages/favourableList",
"query": "sellerName=长安&sellerid=4352&oid=1374502&types=1",
"launchMode": "default",
"scene": null
},
{
"name": "pack-activity/pack/confirmPayment",
"pathName": "pack-activity/pack/confirmPayment",
"query": "type=2&types=1&detail=",
"launchMode": "default",
"scene": null
},
{
"name": "pack-activity/pack/vipRecharge",
"pathName": "pack-activity/pack/vipRecharge",
"query": "id=86&name=长安&sid=4352&oid=1374502&types=1&StyleType=8",
"launchMode": "default",
"scene": null
},
{
"name": "新首页",
"pathName": "pages/reserveNew/coupon_sellerList",
"query": "",
... ... @@ -48,13 +83,6 @@
"scene": 1044
},
{
"name": "4352-----新邀请函入口页",
"pathName": "pages/customer/detail_owner_invitation_new",
"query": "id=1374502&uid=27201&hasSellerShare=1&paymentId=",
"launchMode": "default",
"scene": null
},
{
"name": "在线预订包间",
"pathName": "pages/reserve/reserve",
"query": "id=4352&activeTab=reserve",
... ... @@ -90,13 +118,6 @@
"scene": null
},
{
"name": "免费券付费券付款页",
"pathName": "pack-activity/pack/buyFreeCoupon",
"query": "sid=8",
"launchMode": "default",
"scene": null
},
{
"name": "收藏页",
"pathName": "pages/me/follow",
"query": "",
... ...