Commit 7b0bd5095b63902062c9bdde0830930949e1dd66

Authored by pengye
1 parent a03d3a8e

生日宴按钮、样式调整

@@ -31,6 +31,7 @@ Page({ @@ -31,6 +31,7 @@ Page({
31 certificate: '', 31 certificate: '',
32 dataStr: Date.now() * 1 / 1000, 32 dataStr: Date.now() * 1 / 1000,
33 swich_phone: '0', //是否显示前台电话 33 swich_phone: '0', //是否显示前台电话
  34 + is_comments: '0',
34 is_user_comments: false, //是否评价过 true有评价 false没评价 35 is_user_comments: false, //是否评价过 true有评价 false没评价
35 tableinfo: [], //桌子列表 36 tableinfo: [], //桌子列表
36 roomimage: [], //包间图片列表 37 roomimage: [], //包间图片列表
@@ -324,6 +325,7 @@ Page({ @@ -324,6 +325,7 @@ Page({
324 deskStr, 325 deskStr,
325 dateStrDivide: dateStrDivide == '00分' ? '' : dateStrDivide, 326 dateStrDivide: dateStrDivide == '00分' ? '' : dateStrDivide,
326 seller_tel: reserev.seller.seller_tel, 327 seller_tel: reserev.seller.seller_tel,
  328 + phone:reserev.phone,
327 } 329 }
328 }) 330 })
329 console.log('reserev信息', reserev); 331 console.log('reserev信息', reserev);
@@ -533,19 +535,29 @@ Page({ @@ -533,19 +535,29 @@ Page({
533 sharesetting() { 535 sharesetting() {
534 wx.reportMonitor('1017', 1) 536 wx.reportMonitor('1017', 1)
535 this.closeModal() 537 this.closeModal()
536 - let parmdata = {  
537 - id: this.id,  
538 - fromid: getApp().openid,  
539 - hasInvitation: 1,  
540 - tplid: this.data.options.tplid  
541 - }  
542 - if (this.data.options.uid) {  
543 - parmdata.uid = this.data.options.uid;  
544 - }  
545 - return {  
546 - title: '我已订好' + this.data.seller.name + ',点击可查看详情并导航到店',  
547 - path: util.http_build_query(parmdata, '/pages/customer/detail_owner_invitation_new'),  
548 - imageUrl: this.data.imgSrc || 'http://nosqn.colorcun.com/reserve/images/3x/%E6%9A%82%E6%97%A0.png', 538 + if(this.data.options.isOrder == '1' && this.data.detail.status !='4'){
  539 + return {
  540 + title: '推荐' + this.data.seller.name + ',点击可查看详情并导航到店',
  541 + path: util.http_build_query({
  542 + id: this.data.detail.seller.id
  543 + }, '/pages/reserve/shopHome'),
  544 + imageUrl: this.data.detail.seller.seller_image || 'http://nosqn.colorcun.com/reserve/images/3x/%E6%9A%82%E6%97%A0.png',
  545 + }
  546 + }else{
  547 + let parmdata = {
  548 + id: this.id,
  549 + fromid: getApp().openid,
  550 + hasInvitation: 1,
  551 + tplid: this.data.options.tplid
  552 + }
  553 + if (this.data.options.uid) {
  554 + parmdata.uid = this.data.options.uid;
  555 + }
  556 + return {
  557 + title: '我已订好' + this.data.seller.name + ',点击可查看详情并导航到店',
  558 + path: util.http_build_query(parmdata, '/pages/customer/detail_owner_invitation_new'),
  559 + imageUrl: this.data.imgSrc || 'http://nosqn.colorcun.com/reserve/images/3x/%E6%9A%82%E6%97%A0.png',
  560 + }
549 } 561 }
550 }, 562 },
551 // 修改detail数据 563 // 修改detail数据
@@ -652,11 +664,12 @@ Page({ @@ -652,11 +664,12 @@ Page({
652 StyleType, 664 StyleType,
653 lite_style: data.lite_style, 665 lite_style: data.lite_style,
654 timeList, 666 timeList,
  667 + is_comments,
655 isMoreBtn: marketing && marketing.is_online_book == '1' && this.data.options.onlineReserve == '1', 668 isMoreBtn: marketing && marketing.is_online_book == '1' && this.data.options.onlineReserve == '1',
656 isShareItem: this.data.options.isOrder != '1' && marketing && marketing.is_transpond == '1', 669 isShareItem: this.data.options.isOrder != '1' && marketing && marketing.is_transpond == '1',
657 isComments: is_comments == '1' && marketing && marketing.is_comments_coupon == '1', 670 isComments: is_comments == '1' && marketing && marketing.is_comments_coupon == '1',
658 } 671 }
659 - console.log('GetSellerTemplateConf----------获取数据', { 672 + console.log('获取数据--------------------GetSellerTemplateConf', {
660 ...obj 673 ...obj
661 }); 674 });
662 this.setData({ 675 this.setData({
@@ -872,6 +885,8 @@ Page({ @@ -872,6 +885,8 @@ Page({
872 detail.stringifyUse = detail.use ? JSON.stringify(detail.use) : ''; 885 detail.stringifyUse = detail.use ? JSON.stringify(detail.use) : '';
873 detail.exp_date = detail.exp_date ? util.determine(detail.exp_date) : ''; 886 detail.exp_date = detail.exp_date ? util.determine(detail.exp_date) : '';
874 detail.use = detail.use ? util.determine(detail.use) : ''; 887 detail.use = detail.use ? util.determine(detail.use) : '';
  888 + detail.stimeStr = util.unixtoTime(detail.stime, 'YYYY-MM-DD HH:II' )
  889 + detail.etimeStr = util.unixtoTime(detail.etime, 'YYYY-MM-DD HH:II' )
875 coupon_dataList.push(detail); 890 coupon_dataList.push(detail);
876 if (length === coupon_dataList.length) { 891 if (length === coupon_dataList.length) {
877 coupon_dataList = coupon_dataList.filter(item => { 892 coupon_dataList = coupon_dataList.filter(item => {
@@ -1023,8 +1038,8 @@ Page({ @@ -1023,8 +1038,8 @@ Page({
1023 })); 1038 }));
1024 if (intel.content && intel.content.length > 0 && intel.is_introduce_all == '1') { 1039 if (intel.content && intel.content.length > 0 && intel.is_introduce_all == '1') {
1025 intel.textInfo = intel.content.filter(item => item.type === "2").map(item => item.content).join('\n'); 1040 intel.textInfo = intel.content.filter(item => item.type === "2").map(item => item.content).join('\n');
1026 - intel.imgsInfo = intel.content.filter(item => item.type === "1").map(item => item.content);  
1027 - intel.videoImgsInfo = intel.content.filter(item => (item.type === "1" || item.type === "3")); 1041 + intel.imgsInfo = intel.content.filter(item => item.type === "1" && item.content).map(item => item.content);
  1042 + intel.videoImgsInfo = intel.content.filter(item => ((item.type === "1" || item.type === "3") && item.content));
1028 } 1043 }
1029 return intel 1044 return intel
1030 }, 1045 },
@@ -71,27 +71,43 @@ @@ -71,27 +71,43 @@
71 </view> 71 </view>
72 </view> 72 </view>
73 <!-- 优惠券 --> 73 <!-- 优惠券 -->
74 - <view class="publicModule preferentialCoupon" wx:if="{{hasValueCertificate && marketing.is_coupon=='1' && coupon_dataList.length>0}}"> 74 + <view class="publicModule preferentialCoupon couponBox" wx:if="{{hasValueCertificate && marketing.is_coupon=='1' && coupon_dataList.length>0}}">
75 <image class="titleImg5" src="https://qn.colorcun.com/invitation10Title1.png" mode="" /> 75 <image class="titleImg5" src="https://qn.colorcun.com/invitation10Title1.png" mode="" />
76 <block wx:for="{{coupon_dataList}}" wx:key="index" wx:for-index="index"> 76 <block wx:for="{{coupon_dataList}}" wx:key="index" wx:for-index="index">
77 <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"> 77 <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">
78 <view class="preferentialItems"> 78 <view class="preferentialItems">
79 - <view class="certificateInfo">  
80 - <text class="discountText font20r">{{item.use.is_cash=='1'?'代金券':item.use.is_discount=='1'?'超值折扣':item.use.is_dish=='1'?'特惠菜品':''}}</text>  
81 - <view class="ticketName font36r">{{item.aname}}</view>  
82 - <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+'可用':''}}{{item.desc?','+item.desc+'。':'。'}}</text>  
83 - <view wx:if="{{item.exp_date.is_none=='1' || item.exp_date.is_none===true}}" class="limitation font24r">  
84 - 无限制{{item.desc?','+item.desc+'。':'。'}}  
85 - </view>  
86 - <view wx:if="{{item.exp_date.is_birthday=='1' || item.exp_date.is_birthday===true}}" class="limitation font24r">  
87 - 会员生日当天可用{{item.desc?','+item.desc+'。':'。'}} 79 + <view class="purchase">
  80 + <view class="priceText" wx:if="{{item.price}}">
  81 + <view class="icons">¥<text class="priceText">{{item.price}}</text></view>
  82 + <view class="descBox" wx:if="{{item.price == '0' && item.desc}}">{{item.desc}}</view>
88 </view> 83 </view>
  84 + <image class="certificateImg" src="https://qn.colorcun.com/invitation10certificate.png" mode="" />
89 </view> 85 </view>
90 - <view class="purchase font40r">  
91 - <view class="priceText" wx:if="{{item.price}}">  
92 - <view class="icons font40r">¥</view>{{item.price}} 86 + <view class="certificateInfo">
  87 + <view class="preferentialDetails">
  88 + <view class="information">
  89 + <text class="discountText font20r">{{item.use.is_cash=='1'?'代金券':item.use.is_discount=='1'?'超值折扣':item.use.is_dish=='1'?'特惠菜品':''}}</text>
  90 + <text class="ticketName font24r">{{item.aname}}</text>
  91 + </view>
  92 + <block wx:if="{{item.price != '0'}}">
  93 + <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>
  94 + <view wx:if="{{item.exp_date.is_none=='1' || item.exp_date.is_none===true}}" class="limitation font24r">
  95 + 无限制{{item.desc?','+item.desc+'。':'。'}}
  96 + </view>
  97 + <view wx:if="{{item.exp_date.is_birthday=='1' || item.exp_date.is_birthday===true}}" class="limitation font24r">
  98 + 会员生日当天可用{{item.desc?','+item.desc+'。':'。'}}
  99 + </view>
  100 + </block>
  101 + <block wx:else>
  102 + <text class="limitation font24r">开始时间:{{item.stimeStr}}</text>
  103 + <text class="limitation font24r">结束时间:{{item.etimeStr}}</text>
  104 + </block>
  105 + </view>
  106 + <view class="limitationBtn">
  107 + <view class="font24r {{item.price == '0' ? 'couponBtn couponBtn1' : 'couponBtn'}}">{{item.price == '0' ? '免费领取' : '立即购买'}}</view>
  108 + <view class="font24r limitationText" wx:if="{{item.price == '0'}}">已被领取</view>
  109 + <view class="font24r limitationText" wx:if="{{item.price == '0'}}"><text>{{(item.grant_num*1) - (item.grant_last*1)}}</text>张</view>
93 </view> 110 </view>
94 - <view class="font24r couponBtn">立即购买</view>  
95 </view> 111 </view>
96 </view> 112 </view>
97 </navigator> 113 </navigator>
@@ -123,8 +139,9 @@ @@ -123,8 +139,9 @@
123 </view> 139 </view>
124 </view> 140 </view>
125 <!-- 评价券 --> 141 <!-- 评价券 -->
126 - <view class="publicModule evaluateCoupon" wx:if="{{!is_user_comments && isComments =='1' && couponData.showCoupon =='1'}}"> 142 + <view class="publicModule" wx:if="{{!is_user_comments && isComments =='1' && couponData.showCoupon =='1'}}">
127 <image class="titleImg4" src="https://qn.colorcun.com/invitation10Title3.png" mode="" /> 143 <image class="titleImg4" src="https://qn.colorcun.com/invitation10Title3.png" mode="" />
  144 + <view class="font28r evaluateTitleText">期待您的声音,帮助我们持续改进</view>
128 <view class="preferentialItems" bindtap="evaluateFun"> 145 <view class="preferentialItems" bindtap="evaluateFun">
129 <view class="certificateInfo"> 146 <view class="certificateInfo">
130 <text class="discountText font20r">评价有礼</text> 147 <text class="discountText font20r">评价有礼</text>
@@ -145,6 +162,18 @@ @@ -145,6 +162,18 @@
145 </view> 162 </view>
146 </view> 163 </view>
147 </view> 164 </view>
  165 + <!-- 评价没有券 -->
  166 + <view class="publicModule evaluateCoupon" wx:if="{{is_comments=='1' && (marketing.is_comments_coupon!='1' || couponData.showCoupon!='1')}}">
  167 + <image class="titleImg4" src="https://qn.colorcun.com/invitation10Title3.png" mode="" />
  168 + <view class="preferentialItems" bindtap="evaluateFun">
  169 + <image class="evaluateImg" src="https://qn.colorcun.com/invitation10Union.png" mode="" />
  170 + <view class="evaluateText">
  171 + <text>期待您的声音</text>
  172 + <text>帮助我们持续改进</text>
  173 + </view>
  174 + <view class="font24r couponBtn">去评价</view>
  175 + </view>
  176 + </view>
148 <!-- 停车指引 --> 177 <!-- 停车指引 -->
149 <view class="publicModule" wx:if="{{reserve && (reserve.textInfo || reserve.videoImgsInfo.length>0)}}"> 178 <view class="publicModule" wx:if="{{reserve && (reserve.textInfo || reserve.videoImgsInfo.length>0)}}">
150 <image class="titleImg4" src="https://qn.colorcun.com/invitation10Title4.png" mode="" /> 179 <image class="titleImg4" src="https://qn.colorcun.com/invitation10Title4.png" mode="" />
@@ -215,10 +244,14 @@ @@ -215,10 +244,14 @@
215 {{toastText}} 244 {{toastText}}
216 </view> 245 </view>
217 </scroll-view> 246 </scroll-view>
218 -<view wx:if="{{isMoreBtn || (detail.status !='4' && isPaymenBtn) || (detail.status !='4' && isShareItem)}}" class="flex-lr sharewidth">  
219 - <view wx:if="{{isMoreBtn}}" class="flex-cc font30r moreBtn {{(detail.status !='4' && isPaymenBtn && isShareItem) ? 'threeBtn' : ''}}" bindtap="secondbook">再次预订</view>  
220 - <view wx:if="{{detail.status !='4' && isPaymenBtn}}" class="flex-cc font30r paymenBtn {{(isMoreBtn && (detail.status !='4' && isShareItem)) ? 'threeBtn' : ''}}" bindtap="paymentFun">支付定金</view> 247 +<!-- (开启在线预订 显示在线预订) || (未开启在线预订 显示再次预订(打商家电话)) -->
  248 +<!-- (未结束&&未取消 && 开启转发开关 显示 转发邀请函给客人) || (过了当前餐段结束时间||用餐完成||已取消 显示 转发店铺给好友) -->
  249 +<view wx:if="{{isMoreBtn || options.isOrder == '1' || (!isMoreBtn && seller.phone) || (detail.status !='4' && isPaymenBtn) || (detail.status !='4' && isShareItem)}}" class="flex-lr sharewidth">
  250 + <view wx:if="{{isMoreBtn}}" class="flex-cc font30r moreBtn {{((detail.status !='4' && isPaymenBtn) && ((detail.status !='4' && isShareItem) || options.isOrder == '1')) ? 'threeBtn' : ''}}" bindtap="secondbook">再次预订</view>
  251 + <view wx:if="{{!isMoreBtn && seller.phone}}" class="flex-cc font30r moreBtn {{((detail.status !='4' && isPaymenBtn) && ((detail.status !='4' && isShareItem) || options.isOrder == '1')) ? 'threeBtn' : ''}}" bindtap="call" data-phone="{{seller.phone}}">再次预订</view>
  252 + <view wx:if="{{detail.status !='4' && isPaymenBtn}}" class="flex-cc font30r paymenBtn {{((isMoreBtn || (!isMoreBtn && seller.phone)) && ((detail.status !='4' && isShareItem) || options.isOrder == '1')) ? 'threeBtn' : ''}}" bindtap="paymentFun">支付定金</view>
221 <button wx:if="{{detail.status !='4' && isShareItem}}" class="flex-cc font30r shareItem" open-type="share">转发邀请函给客人</button> 253 <button wx:if="{{detail.status !='4' && isShareItem}}" class="flex-cc font30r shareItem" open-type="share">转发邀请函给客人</button>
  254 + <button wx:if="{{options.isOrder == '1'}}" class="flex-cc font30r shareItem" data-type="2" open-type="share">转发店铺给好友</button>
222 </view> 255 </view>
223 <painter palette="{{wxml}}" style="position: absolute; top: -9999rpx;" bind:imgOK="onImgOK" /> 256 <painter palette="{{wxml}}" style="position: absolute; top: -9999rpx;" bind:imgOK="onImgOK" />
224 <my-modal id="payModal" fadeStyle="slideUp" height="240px"> 257 <my-modal id="payModal" fadeStyle="slideUp" height="240px">
@@ -104,7 +104,7 @@ @@ -104,7 +104,7 @@
104 word-break: break-all; 104 word-break: break-all;
105 text-overflow: ellipsis; 105 text-overflow: ellipsis;
106 display: -webkit-box; 106 display: -webkit-box;
107 - font-weight: 400; 107 + font-weight: 600;
108 -webkit-box-orient: vertical; 108 -webkit-box-orient: vertical;
109 } 109 }
110 110
@@ -368,6 +368,107 @@ @@ -368,6 +368,107 @@
368 text-align: center; 368 text-align: center;
369 } 369 }
370 370
  371 +.couponBox .certificateInfo {
  372 + flex-direction: row;
  373 +}
  374 +
  375 +.couponBox .couponBtn {
  376 + width: 100%;
  377 + height: fit-content;
  378 + background: #CC9B6A;
  379 + color: #fff;
  380 +}
  381 +
  382 +.couponBox .couponBtn1 {
  383 + color: #CC9B6A;
  384 + border: 2rpx solid #CC9B6A;
  385 + background: transparent;
  386 + margin-bottom: 20rpx;
  387 +}
  388 +
  389 +.couponBox .certificateInfo .preferentialDetails {
  390 + width: 100%;
  391 + display: flex;
  392 + flex-direction: column;
  393 +}
  394 +
  395 +.couponBox .information {
  396 + display: flex;
  397 +}
  398 +
  399 +.couponBox .discountText {
  400 + position: relative;
  401 + height: max-content;
  402 + left: 0;
  403 + margin-right: 8rpx;
  404 + min-width: 90rpx;
  405 +}
  406 +
  407 +.couponBox .ticketName {
  408 + overflow: hidden;
  409 + word-break: break-all;
  410 + text-overflow: ellipsis;
  411 + display: -webkit-box;
  412 + -webkit-box-orient: vertical;
  413 + -webkit-line-clamp: 1;
  414 + margin-top: 16rpx;
  415 +}
  416 +
  417 +.couponBox .purchase {
  418 + width: 22%;
  419 + position: relative;
  420 +}
  421 +
  422 +.couponBox .certificateImg {
  423 + position: absolute;
  424 + top: 0;
  425 + left: 0;
  426 + width: 100rpx;
  427 + height: 28rpx;
  428 +}
  429 +
  430 +.couponBox .icons {
  431 + font-size: 20rpx;
  432 + display: flex;
  433 + align-items: baseline;
  434 +}
  435 +
  436 +.couponBox .priceText {
  437 + font-size: 52rpx;
  438 +}
  439 +
  440 +.couponBox .priceText {
  441 + display: flex;
  442 + flex-direction: column;
  443 +}
  444 +
  445 +.couponBox .descBox {
  446 + font-size: 20rpx;
  447 +}
  448 +
  449 +.couponBox .limitationBtn {
  450 + width: 40%;
  451 + display: flex;
  452 + flex-direction: column;
  453 + align-items: center;
  454 +}
  455 +
  456 +.couponBox .limitationText {
  457 + color: #666;
  458 +}
  459 +
  460 +.couponBox .limitationText text {
  461 + color: #CC9B6A;
  462 + margin-right: 4rpx;
  463 +}
  464 +
  465 +.evaluateTitleText {
  466 + font-weight: 600;
  467 + font-size: 28rpx;
  468 + font-family: PingFang SC;
  469 + margin: 40rpx 0;
  470 +}
  471 +
371 .labelBox { 472 .labelBox {
372 width: 100%; 473 width: 100%;
373 margin-top: 20rpx; 474 margin-top: 20rpx;
@@ -386,7 +487,7 @@ @@ -386,7 +487,7 @@
386 background: #CC9B6A; 487 background: #CC9B6A;
387 border-radius: 10rpx; 488 border-radius: 10rpx;
388 color: #fff; 489 color: #fff;
389 - padding: 18rpx 40rpx; 490 + padding: 26rpx 40rpx;
390 display: flex; 491 display: flex;
391 align-items: center; 492 align-items: center;
392 justify-content: space-between; 493 justify-content: space-between;
@@ -402,6 +503,33 @@ @@ -402,6 +503,33 @@
402 padding: 4rpx 36rpx; 503 padding: 4rpx 36rpx;
403 } 504 }
404 505
  506 +.evaluateCoupon .evaluateImg {
  507 + width: 62rpx;
  508 + height: 60rpx;
  509 +}
  510 +
  511 +.evaluateCoupon .preferentialItems {
  512 + background: #CC9B6A;
  513 + align-items: center;
  514 + padding: 0 44rpx 0 40rpx;
  515 + box-sizing: border-box;
  516 + border-radius: 10rpx;
  517 +}
  518 +
  519 +.evaluateCoupon .couponBtn {
  520 + width: max-content;
  521 + height: max-content;
  522 + padding: 4rpx 20rpx;
  523 + margin-top: 0;
  524 +}
  525 +
  526 +.evaluateCoupon .evaluateText {
  527 + display: flex;
  528 + flex-direction: column;
  529 + color: #fff;
  530 + margin: 0 28% 0 40rpx;
  531 +}
  532 +
405 .detailBanner { 533 .detailBanner {
406 width: 100%; 534 width: 100%;
407 height: 500rpx; 535 height: 500rpx;