Commit 7145729aaf3f2da2471565a6a37e869c1bdce482

Authored by pengye
1 parent bf9f76c2

邀请函生日宴 优惠券修改

... ... @@ -31,7 +31,7 @@ Page({
certificate: '',
dataStr: Date.now() * 1 / 1000,
swich_phone: '0', //是否显示前台电话
is_comments: '0',
is_comments: '0',
is_user_comments: false, //是否评价过 true有评价 false没评价
tableinfo: [], //桌子列表
roomimage: [], //包间图片列表
... ... @@ -325,7 +325,7 @@ Page({
deskStr,
dateStrDivide: dateStrDivide == '00分' ? '' : dateStrDivide,
seller_tel: reserev.seller.seller_tel,
phone:reserev.phone,
phone: reserev.phone,
}
})
console.log('reserev信息', reserev);
... ... @@ -535,7 +535,7 @@ Page({
sharesetting() {
wx.reportMonitor('1017', 1)
this.closeModal()
if(this.data.options.isOrder == '1' && this.data.detail.status !='4'){
if (this.data.options.isOrder == '1' && this.data.detail.status != '4') {
return {
title: '推荐' + this.data.seller.name + ',点击可查看详情并导航到店',
path: util.http_build_query({
... ... @@ -543,7 +543,7 @@ Page({
}, '/pages/reserve/shopHome'),
imageUrl: this.data.detail.seller.seller_image || 'http://nosqn.colorcun.com/reserve/images/3x/%E6%9A%82%E6%97%A0.png',
}
}else{
} else {
let parmdata = {
id: this.id,
fromid: getApp().openid,
... ... @@ -864,6 +864,11 @@ Page({
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) : '';
}
// showCoupon 代表赠送的券没过有效期 && 是开启状态
couponData.showCoupon = (this.data.dataStr < (couponData.etime * 1) && couponData.is_open == '1') ? '1' : '0';
console.log('邀请函--------------------评价赠送的优惠券', couponData);
... ... @@ -885,8 +890,13 @@ Page({
detail.stringifyUse = detail.use ? JSON.stringify(detail.use) : '';
detail.exp_date = detail.exp_date ? util.determine(detail.exp_date) : '';
detail.use = detail.use ? util.determine(detail.use) : '';
detail.stimeStr = util.unixtoTime(detail.stime, 'YYYY-MM-DD HH:II' )
detail.etimeStr = util.unixtoTime(detail.etime, 'YYYY-MM-DD HH:II' )
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.stimeStr = util.unixtoTime(detail.stime, 'YYYY-MM-DD HH:II')
detail.etimeStr = util.unixtoTime(detail.etime, 'YYYY-MM-DD HH:II')
coupon_dataList.push(detail);
if (length === coupon_dataList.length) {
coupon_dataList = coupon_dataList.filter(item => {
... ...
... ... @@ -15,19 +15,19 @@
<text space="nbsp" wx:if="{{reserve.swich_booking=='1' && reserve.book_info}}" class="contentData font28r bookData">{{reserve.book_info}}</text>
</view>
<view class="infoItem" wx:if="{{detail.rnameStr && reserve.swich_customer == '1'}}">
<view class="record font28r">预订贵宾:</view>
<view class="record font28r">预订贵宾:</view>
<view class="contentData font28r">{{detail.rnameStr}}</view>
</view>
<view class="infoItem" wx:if="{{seller.date}}">
<view class="record font28r">用餐日期:</view>
<view class="record font28r">用餐日期:</view>
<view class="contentData font28r">{{seller.date}}</view>
</view>
<view class="infoItem" wx:if="{{seller.tablesText}}">
<view class="record font28r">用餐位置:</view>
<view class="record font28r">用餐位置:</view>
<view class="contentData font28r">{{seller.tablesText}}</view>
</view>
<view class="infoItem" wx:if="{{seller.soltName}}">
<view class="record font28r">用餐时间:</view>
<view class="record font28r">用餐时间:</view>
<view class="arrivalBox">
<view class="contentData font28r">{{seller.soltName}}<text class="marLeft font28r">{{temp_ddate}}</text></view>
<picker wx:if="{{options.isOrder != '1' && (detail.status =='1' || detail.status =='2') && options.hasSellerShare == '1'}}" bindchange="bindPickerChange" value="{{index}}" range="{{timeList}}">
... ... @@ -38,7 +38,7 @@
</view>
</view>
<view class="infoItem" wx:if="{{swich_phone!='0' && seller.tel && seller.tel.length>0}}">
<view class="record font28r">前台电话:</view>
<view class="record font28r">前台电话:</view>
<view class="contentData font28r">
<block wx:for="{{seller.tel}}" wx:key="index"><text data-phone="{{item}}" class="contentDataPhone" bindtap="call">{{item}}</text><text class="divider">{{index==(seller.tel.length-1)?'':','}}</text></block>
</view>
... ... @@ -71,7 +71,7 @@
</view>
</view>
<!-- 优惠券 -->
<view class="publicModule preferentialCoupon couponBox" wx:if="{{hasValueCertificate && marketing.is_coupon=='1' && coupon_dataList.length>0}}">
<view class="publicModule couponBox" wx:if="{{hasValueCertificate && marketing.is_coupon=='1' && 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 url="/pack-activity/pack/buyCoupon?id={{item.id}}&name={{seller.name}}&use={{item.stringifyUse}}&sid={{seller.sid}}&oid={{detail.id}}&types=1&StyleType={{StyleType}}" hover-class="navigator-hover">
... ... @@ -79,9 +79,9 @@
<view class="purchase">
<view class="priceText" wx:if="{{item.price}}">
<view class="icons">¥<text class="priceText">{{item.price}}</text></view>
<view class="descBox" wx:if="{{item.price == '0' && item.desc}}">{{item.desc}}</view>
</view>
<image class="certificateImg" src="https://qn.colorcun.com/invitation10certificate.png" mode="" />
<image class="certificateImg" src="{{(item.discount!='0.00' && (item.use.is_cash=='1' || item.use.is_cash) && item.discount)?'https://qn.colorcun.com/invitation10certificate1.png':'https://qn.colorcun.com/invitation10certificate.png'}}" mode="" />
<text wx:if="{{item.discount!='0.00' && (item.use.is_cash=='1' || item.use.is_cash) && item.discount}}" class="discountInfo">{{item.discount}}折</text>
</view>
<view class="certificateInfo">
<view class="preferentialDetails">
... ... @@ -89,27 +89,24 @@
<text class="discountText font20r">{{item.use.is_cash=='1'?'代金券':item.use.is_discount=='1'?'超值折扣':item.use.is_dish=='1'?'特惠菜品':''}}</text>
<text class="ticketName font24r">{{item.aname}}</text>
</view>
<block wx:if="{{item.price != '0'}}">
<text wx:if="{{item.exp_date.is_week=='1' || item.exp_date.is_week===true}}" class="limitation font24r">{{item.exp_date.week_show?item.exp_date.week_show+'可用':''}}</text>
<view wx:if="{{item.exp_date.is_none=='1' || item.exp_date.is_none===true}}" class="limitation font24r">
无限制{{item.desc?','+item.desc+'。':'。'}}
</view>
<view wx:if="{{item.exp_date.is_birthday=='1' || item.exp_date.is_birthday===true}}" class="limitation font24r">
会员生日当天可用{{item.desc?','+item.desc+'。':'。'}}
</view>
</block>
<block wx:else>
<text class="limitation font24r">开始时间:{{item.stimeStr}}</text>
<text class="limitation font24r">结束时间:{{item.etimeStr}}</text>
</block>
<text wx:if="{{item.exp_date.is_week=='1' || item.exp_date.is_week===true}}" class="limitation font24r">{{item.exp_date.week_show?item.exp_date.week_show+'可用':''}}</text>
<view wx:if="{{item.exp_date.is_none=='1' || item.exp_date.is_none===true}}" class="limitation font24r">
无限制
</view>
<view wx:if="{{item.exp_date.is_birthday=='1' || item.exp_date.is_birthday===true}}" class="limitation font24r">
会员生日当天可用
</view>
<view wx:if="{{item.desc}}" class="limitation showDesc">
<text class="font24r">消费要求</text>
<image src="https://qn.colorcun.com/invitation10Sicon.png" mode="" />
</view>
</view>
<view class="limitationBtn">
<view class="font24r {{item.price == '0' ? 'couponBtn couponBtn1' : 'couponBtn'}}">{{item.price == '0' ? '免费领取' : '立即购买'}}</view>
<view class="font24r limitationText" wx:if="{{item.price == '0'}}">已被领取</view>
<view class="font24r limitationText" wx:if="{{item.price == '0'}}"><text>{{(item.grant_num*1) - (item.grant_last*1)}}</text>张</view>
<view class="font24r couponBtn">立即抢购</view>
</view>
</view>
</view>
<view wx:if="{{item.desc}}" class="bottomLimitation limitation font24r"><text></text>{{item.desc}}</view>
</navigator>
</block>
</view>
... ... @@ -118,7 +115,7 @@
<image class="titleImg6" src="https://qn.colorcun.com/invitation10Title2.png" mode="" />
<navigator url="/pack-activity/pack/vipRecharge?id={{recharge_data.id}}&name={{seller.name}}&sid={{seller.sid}}&oid={{detail.id}}&types=1&StyleType={{StyleType}}" hover-class="navigator-hover">
<view class="rechargeItems">
<image class="checkImg" src="https://qn.colorcun.com/invitation10vector.png" mode="" />
<image class="checkImg" src="https://qn.colorcun.com/invitation10vector1.png" mode="" />
<view class="rechargeTitle font36r">{{recharge_data.rname}}</view>
<view class="limitation font24r" wx:if="{{priceInfo}}">
{{priceInfo}}{{(recharge_data.recharge_list.is_coupons=='0' && recharge_data.recharge_list.is_score=='0')?'。':';'}}
... ... @@ -135,31 +132,46 @@
</view>
</navigator>
<view wx:if="{{hasValueRecharge && marketing.is_link=='1'}}" class="font24r favouredPolicy" bindtap="gotoFavourableList">
点击了解更多会员优惠政策
了解更多会员优惠政策
</view>
</view>
<!-- 评价券 -->
<view class="publicModule" wx:if="{{!is_user_comments && isComments =='1' && couponData.showCoupon =='1'}}">
<view class="publicModule couponBox" wx:if="{{!is_user_comments && isComments =='1' && couponData.showCoupon =='1'}}">
<image class="titleImg4" src="https://qn.colorcun.com/invitation10Title3.png" mode="" />
<view class="font28r evaluateTitleText">期待您的声音,帮助我们持续改进</view>
<view class="preferentialItems" bindtap="evaluateFun">
<view class="certificateInfo">
<text class="discountText font20r">评价有礼</text>
<view class="ticketName font36r">{{couponData.aname}}</view>
<text wx:if="{{couponData.exp_date.is_week=='1' || couponData.exp_date.is_week===true}}" class="limitation 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="limitation font24r">
无限制{{couponData.desc?','+couponData.desc+'。':'。'}}
</view>
<view wx:if="{{couponData.exp_date.is_birthday=='1' || couponData.exp_date.is_birthday===true}}" class="limitation font24r">
会员生日当天可用{{couponData.desc?','+couponData.desc+'。':'。'}}
<view class="couponInfo" bindtap="evaluateFun">
<view class="preferentialItems">
<view class="purchase">
<view class="priceText" wx:if="{{couponData.price}}">
<view class="icons">¥<text class="priceText">{{couponData.price}}</text></view>
</view>
<image class="certificateImg" src="{{(couponData.discount!='0.00' && (couponData.use.is_cash=='1' || couponData.use.is_cash) && couponData.discount)?'https://qn.colorcun.com/invitation10certificate1.png':'https://qn.colorcun.com/invitation10certificate.png'}}" mode="" />
<text wx:if="{{couponData.discount!='0.00' && (couponData.use.is_cash=='1' || couponData.use.is_cash) && couponData.discount}}" class="discountInfo">{{couponData.discount}}折</text>
</view>
</view>
<view class="purchase font40r">
<view class="priceText" wx:if="{{couponData.price}}">
<view class="icons font40r">¥</view>{{couponData.price}}
<view class="certificateInfo">
<view class="preferentialDetails">
<view class="information">
<text class="discountText font20r">{{couponData.use.is_cash=='1'?'代金券':couponData.use.is_discount=='1'?'超值折扣':couponData.use.is_dish=='1'?'特惠菜品':''}}</text>
<text class="ticketName font24r">{{couponData.aname}}</text>
</view>
<text wx:if="{{couponData.exp_date.is_week=='1' || couponData.exp_date.is_week===true}}" class="limitation font24r">{{couponData.exp_date.week_show?couponData.exp_date.week_show+'可用':''}}</text>
<view wx:if="{{couponData.exp_date.is_none=='1' || couponData.exp_date.is_none===true}}" class="limitation font24r">
无限制
</view>
<view wx:if="{{couponData.exp_date.is_birthday=='1' || couponData.exp_date.is_birthday===true}}" class="limitation font24r">
会员生日当天可用
</view>
<view wx:if="{{couponData.desc}}" class="limitation showDesc">
<text class="font24r">消费要求</text>
<image src="https://qn.colorcun.com/invitation10Sicon.png" mode="" />
</view>
</view>
<view class="limitationBtn">
<view class="font24r couponBtn">立即领取</view>
</view>
</view>
<view class="font24r couponBtn">{{couponData.price=='0'?'免费领取':'立即领取'}}</view>
</view>
<view wx:if="{{couponData.desc}}" class="bottomLimitation limitation font24r"><text></text>{{couponData.desc}}</view>
</view>
</view>
<!-- 评价没有券 -->
... ... @@ -201,7 +213,7 @@
</swiper>
</view>
<!-- 招牌菜品 -->
<view class="publicModule" wx:if="{{signboard && (signboard.textInfo || signboard.videoImgsInfo.length>0 || (hasValueOrder && openOrder == '1' && marketing.is_order=='1'))}}">
<view class="publicModule" wx:if="{{(signboard && signboard.textInfo || signboard.videoImgsInfo.length>0) || (hasValueOrder && openOrder == '1' && marketing.is_order=='1')}}">
<image class="titleImg4" src="https://qn.colorcun.com/invitation10Title6.png" mode="" />
<view class="labelBox" wx:if="{{signboard.textInfo}}">
<text class="texts font28r" space="nbsp">{{signboard.textInfo}}</text>
... ...
... ... @@ -54,7 +54,7 @@
flex: 1;
line-height: 60rpx;
font-family: PingFang SC;
margin-left: 40rpx;
margin-left: 4rpx;
font-weight: 600;
}
... ... @@ -83,7 +83,7 @@
.positioning {
display: flex;
align-items: center;
background: #fff8ea;
background: #fff;
border-radius: 20rpx;
color: #111;
padding: 20rpx;
... ... @@ -137,7 +137,7 @@
.peopleInfo view {
font-family: "PingFang SC";
font-weight: 400;
font-weight: 600;
}
.handleInfo {
... ... @@ -147,7 +147,7 @@
}
.handleInfo view {
font-weight: 400;
font-weight: 600;
letter-spacing: 10rpx;
}
... ... @@ -204,19 +204,14 @@
height: 100rpx;
}
.preferentialCoupon navigator {
width: 100%;
}
.preferentialItems {
width: 100%;
display: flex;
margin-bottom: 20rpx;
min-height: 160rpx;
padding-bottom: 10rpx;
}
.purchase {
position: relative;
width: 30%;
display: flex;
flex-direction: column;
... ... @@ -234,9 +229,7 @@
background: #FD4D59;
width: max-content;
padding: 6rpx;
position: absolute;
left: 16rpx;
top: 12rpx;
margin-right: 8rpx;
}
.priceText {
... ... @@ -247,34 +240,43 @@
display: flex;
align-items: center;
justify-content: center;
font-size: 52rpx;
flex-direction: column;
}
.priceText .icons {
font-family: PingFang SC;
color: #fff;
font-size: 20rpx;
display: flex;
align-items: baseline;
}
.certificateInfo {
width: 70%;
padding: 40rpx 10rpx 20rpx 28rpx;
padding: 20rpx;
position: relative;
background: #fff1e7;
border-radius: 10rpx;
display: flex;
flex-direction: column;
justify-content: center;
background: #fff;
align-items: center;
}
.certificateInfo .limitation {
line-height: 38rpx;
line-height: 40rpx;
}
.ticketName {
margin: 20rpx 20rpx 0 0;
display: flex;
justify-content: space-between;
align-items: baseline;
font-weight: 700;
overflow: hidden;
word-break: break-all;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 1;
}
.orderingFood {
... ... @@ -294,7 +296,6 @@
.limitation {
margin-top: 10rpx;
width: 100%;
color: #666;
font-family: PingFang SC;
font-weight: 500;
... ... @@ -332,13 +333,14 @@
}
.couponBtn {
width: 70%;
padding: 6rpx 0;
background: #fff;
color: #000;
border-radius: 42rpx;
text-align: center;
margin-top: 24rpx;
width: 100%;
height: fit-content;
background: #CC9B6A;
color: #fff;
}
.favouredPolicy {
... ... @@ -361,15 +363,56 @@
.rechargeBtn view {
width: 80%;
padding: 10rpx 0;
padding: 12rpx 0;
background: #CC9B6A;
border-radius: 42rpx;
color: #fff;
text-align: center;
}
.couponBox navigator,
.couponBox .couponInfo {
width: 100%;
margin-bottom: 20rpx;
padding-bottom: 10rpx;
border-radius: 10rpx;
background: #fff;
}
.couponBox .preferentialItems {
box-shadow: 0rpx 4rpx 8rpx #0000000d;
}
.couponBox .showDesc {
display: flex;
align-items: center;
}
.couponBox .showDesc image {
width: 25rpx;
height: 24rpx;
margin-left: 8rpx;
}
.bottomLimitation {
padding: 20rpx;
display: flex;
align-items: center;
}
.bottomLimitation text {
display: block;
width: 8rpx;
height: 8rpx;
background: #999999;
margin-right: 12rpx;
border-radius: 50%;
}
.couponBox .certificateInfo {
flex-direction: row;
background: #fff;
align-items: center;
}
.couponBox .couponBtn {
... ... @@ -379,13 +422,6 @@
color: #fff;
}
.couponBox .couponBtn1 {
color: #CC9B6A;
border: 2rpx solid #CC9B6A;
background: transparent;
margin-bottom: 20rpx;
}
.couponBox .certificateInfo .preferentialDetails {
width: 100%;
display: flex;
... ... @@ -394,29 +430,29 @@
.couponBox .information {
display: flex;
align-items: center;
}
.couponBox .discountText {
position: relative;
height: max-content;
left: 0;
margin-right: 8rpx;
min-width: 90rpx;
}
.couponBox .ticketName {
overflow: hidden;
word-break: break-all;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 1;
margin-top: 16rpx;
.couponBox .certificateInfo .limitation {
margin-right: 20rpx;
flex: 1;
width: auto;
}
.couponBox .purchase {
width: 22%;
position: relative;
.couponBox .discountInfo {
font-family: PingFang SC;
background: #FD4D59;
position: absolute;
top: 0;
left: 100rpx;
font-size: 16rpx;
border-radius: 0 0 10rpx 0;
padding: 0 6rpx;
height: 28rp;
line-height: 28rpx;
text-align: center;
color: #FFEFC5;
width: max-content;
}
.couponBox .certificateImg {
... ... @@ -427,25 +463,6 @@
height: 28rpx;
}
.couponBox .icons {
font-size: 20rpx;
display: flex;
align-items: baseline;
}
.couponBox .priceText {
font-size: 52rpx;
}
.couponBox .priceText {
display: flex;
flex-direction: column;
}
.couponBox .descBox {
font-size: 20rpx;
}
.couponBox .limitationBtn {
width: 40%;
display: flex;
... ... @@ -453,15 +470,6 @@
align-items: center;
}
.couponBox .limitationText {
color: #666;
}
.couponBox .limitationText text {
color: #CC9B6A;
margin-right: 4rpx;
}
.evaluateTitleText {
font-weight: 600;
font-size: 28rpx;
... ... @@ -469,6 +477,14 @@
margin: 40rpx 0;
}
.preferentialCoupon navigator {
width: 100%;
}
.preferentialCoupon .limitation {
color: #000;
}
.labelBox {
width: 100%;
margin-top: 20rpx;
... ... @@ -508,6 +524,11 @@
height: 60rpx;
}
.evaluateCoupon .couponBtn {
color: #000;
background: #fff;
}
.evaluateCoupon .preferentialItems {
background: #CC9B6A;
align-items: center;
... ... @@ -591,8 +612,8 @@
font-family: PingFang SC;
border-radius: 40rpx;
background: transparent;
color: #cc9b6a;
border: 2rpx solid #cc9b6a;
color: #000;
border: 2rpx solid #000;
}
.shareItem,
... ...