Commit 1c2bbaa1a6564c36e2728c7359bf1909384a5665
1 parent
7b0bd509
邀请函----新增未开启在线预订的再次预订按钮、预订已结束的转发按钮
Showing
17 changed files
with
343 additions
and
321 deletions
| @@ -669,7 +669,7 @@ Page({ | @@ -669,7 +669,7 @@ Page({ | ||
| 669 | isShareItem: this.data.options.isOrder != '1' && marketing && marketing.is_transpond == '1', | 669 | isShareItem: this.data.options.isOrder != '1' && marketing && marketing.is_transpond == '1', |
| 670 | isComments: is_comments == '1' && marketing && marketing.is_comments_coupon == '1', | 670 | isComments: is_comments == '1' && marketing && marketing.is_comments_coupon == '1', |
| 671 | } | 671 | } |
| 672 | - console.log('获取数据--------------------GetSellerTemplateConf', { | 672 | + console.log('获取数据GetSellerTemplateConf--------------------', { |
| 673 | ...obj | 673 | ...obj |
| 674 | }); | 674 | }); |
| 675 | this.setData({ | 675 | this.setData({ |
| @@ -306,6 +306,7 @@ Page({ | @@ -306,6 +306,7 @@ Page({ | ||
| 306 | lat: reserev.seller.lat, | 306 | lat: reserev.seller.lat, |
| 307 | long: reserev.seller.long, | 307 | long: reserev.seller.long, |
| 308 | seller_tel: reserev.seller.seller_tel, | 308 | seller_tel: reserev.seller.seller_tel, |
| 309 | + phone:reserev.phone, | ||
| 309 | yearMonthDay, | 310 | yearMonthDay, |
| 310 | yearMonth, | 311 | yearMonth, |
| 311 | dateStr, | 312 | dateStr, |
| @@ -515,25 +516,35 @@ Page({ | @@ -515,25 +516,35 @@ Page({ | ||
| 515 | }) | 516 | }) |
| 516 | console.log('海报生成成功',this.data.imgSrc); | 517 | console.log('海报生成成功',this.data.imgSrc); |
| 517 | }, | 518 | }, |
| 518 | - // 分享 | ||
| 519 | - sharesetting() { | ||
| 520 | - wx.reportMonitor('1017', 1) | 519 | + // 分享 |
| 520 | + sharesetting() { | ||
| 521 | + wx.reportMonitor('1017', 1) | ||
| 521 | this.closeModal() | 522 | this.closeModal() |
| 522 | - let parmdata = { | ||
| 523 | - id: this.id, | ||
| 524 | - fromid: getApp().openid, | ||
| 525 | - hasInvitation: 1, | ||
| 526 | - tplid: this.data.options.tplid | ||
| 527 | - } | ||
| 528 | - if (this.data.options.uid) { | ||
| 529 | - parmdata.uid = this.data.options.uid; | ||
| 530 | - } | ||
| 531 | - return { | ||
| 532 | - title: '我已订好' + this.data.seller.name + ',点击可查看详情并导航到店', | ||
| 533 | - path: util.http_build_query(parmdata, '/pages/customer/detail_owner_invitation_new'), | ||
| 534 | - imageUrl: this.data.imgSrc || 'http://nosqn.colorcun.com/reserve/images/3x/%E6%9A%82%E6%97%A0.png', | ||
| 535 | - } | ||
| 536 | - }, | 523 | + if(this.data.options.isOrder == '1' && this.data.detail.status !='4'){ |
| 524 | + return { | ||
| 525 | + title: '推荐' + this.data.seller.name + ',点击可查看详情并导航到店', | ||
| 526 | + path: util.http_build_query({ | ||
| 527 | + id: this.data.detail.seller.id | ||
| 528 | + }, '/pages/reserve/shopHome'), | ||
| 529 | + imageUrl: this.data.detail.seller.seller_image || 'http://nosqn.colorcun.com/reserve/images/3x/%E6%9A%82%E6%97%A0.png', | ||
| 530 | + } | ||
| 531 | + }else{ | ||
| 532 | + let parmdata = { | ||
| 533 | + id: this.id, | ||
| 534 | + fromid: getApp().openid, | ||
| 535 | + hasInvitation: 1, | ||
| 536 | + tplid: this.data.options.tplid | ||
| 537 | + } | ||
| 538 | + if (this.data.options.uid) { | ||
| 539 | + parmdata.uid = this.data.options.uid; | ||
| 540 | + } | ||
| 541 | + return { | ||
| 542 | + title: '我已订好' + this.data.seller.name + ',点击可查看详情并导航到店', | ||
| 543 | + path: util.http_build_query(parmdata, '/pages/customer/detail_owner_invitation_new'), | ||
| 544 | + imageUrl: this.data.imgSrc || 'http://nosqn.colorcun.com/reserve/images/3x/%E6%9A%82%E6%97%A0.png', | ||
| 545 | + } | ||
| 546 | + } | ||
| 547 | + }, | ||
| 537 | // 修改detail数据 | 548 | // 修改detail数据 |
| 538 | formatDatail(detail, dateSmart) { | 549 | formatDatail(detail, dateSmart) { |
| 539 | detail.rdateStr = dateSmart; | 550 | detail.rdateStr = dateSmart; |
| @@ -608,24 +619,6 @@ Page({ | @@ -608,24 +619,6 @@ Page({ | ||
| 608 | }) | 619 | }) |
| 609 | } | 620 | } |
| 610 | } | 621 | } |
| 611 | - let obj = { | ||
| 612 | - chef, | ||
| 613 | - reserve, | ||
| 614 | - marketing, | ||
| 615 | - signboard, | ||
| 616 | - store, | ||
| 617 | - home, | ||
| 618 | - coupon, | ||
| 619 | - couponList, | ||
| 620 | - swich_phone, | ||
| 621 | - is_comments, | ||
| 622 | - StyleType, | ||
| 623 | - titleType, | ||
| 624 | - themeColor, | ||
| 625 | - } | ||
| 626 | - console.log('获取数据', { | ||
| 627 | - ...obj | ||
| 628 | - }); | ||
| 629 | // 根据券ID获取券详情 | 622 | // 根据券ID获取券详情 |
| 630 | this.getActivityByIdFun(couponList, couponList.length) | 623 | this.getActivityByIdFun(couponList, couponList.length) |
| 631 | // 根据充值ID获取充值详情 | 624 | // 根据充值ID获取充值详情 |
| @@ -689,7 +682,7 @@ Page({ | @@ -689,7 +682,7 @@ Page({ | ||
| 689 | var nightStr = lunchDis.night.split("-"); | 682 | var nightStr = lunchDis.night.split("-"); |
| 690 | var nightArr = lunchDis.night ? this.computeHour(nightStr[0], nightStr[1], 30) : []; | 683 | var nightArr = lunchDis.night ? this.computeHour(nightStr[0], nightStr[1], 30) : []; |
| 691 | timeList = solt == '1' ? morningArr : solt == '2' ? noonArr : solt == '3' ? nightArr : [] | 684 | timeList = solt == '1' ? morningArr : solt == '2' ? noonArr : solt == '3' ? nightArr : [] |
| 692 | - this.setData({ | 685 | + let obj = { |
| 693 | chef, | 686 | chef, |
| 694 | marketing, | 687 | marketing, |
| 695 | home, | 688 | home, |
| @@ -706,6 +699,12 @@ Page({ | @@ -706,6 +699,12 @@ Page({ | ||
| 706 | timeList, | 699 | timeList, |
| 707 | isMoreBtn:marketing && marketing.is_online_book=='1' && this.data.options.onlineReserve == '1', | 700 | isMoreBtn:marketing && marketing.is_online_book=='1' && this.data.options.onlineReserve == '1', |
| 708 | isShareItem: this.data.options.isOrder != '1' && marketing && marketing.is_transpond=='1', | 701 | isShareItem: this.data.options.isOrder != '1' && marketing && marketing.is_transpond=='1', |
| 702 | + } | ||
| 703 | + console.log('获取数据GetSellerTemplateConf--------------------', { | ||
| 704 | + ...obj | ||
| 705 | + }); | ||
| 706 | + this.setData({ | ||
| 707 | + ...obj | ||
| 709 | }) | 708 | }) |
| 710 | // 开启语音播报 | 709 | // 开启语音播报 |
| 711 | if (reserve && reserve.swich_voice == '1') { | 710 | if (reserve && reserve.swich_voice == '1') { |
| @@ -305,10 +305,14 @@ | @@ -305,10 +305,14 @@ | ||
| 305 | {{toastText}} | 305 | {{toastText}} |
| 306 | </view> | 306 | </view> |
| 307 | </scroll-view> | 307 | </scroll-view> |
| 308 | -<view wx:if="{{isMoreBtn || (detail.status !='4' && isPaymenBtn) || (detail.status !='4' && isShareItem)}}" class="flex-lr sharewidth {{themeColor}}"> | ||
| 309 | - <view wx:if="{{isMoreBtn}}" class="flex-cc font30r moreBtn {{(detail.status !='4' && isPaymenBtn && isShareItem) ? 'threeBtn' : ''}}" bindtap="secondbook">再次预订</view> | ||
| 310 | - <view wx:if="{{detail.status !='4' && isPaymenBtn}}" class="flex-cc font30r paymenBtn {{(isMoreBtn && (detail.status !='4' && isShareItem)) ? 'threeBtn' : ''}}" bindtap="paymentFun">支付定金</view> | ||
| 311 | - <button wx:if="{{detail.status !='4' &&isShareItem}}" class="flex-cc font30r shareItem" open-type="share">转发邀请函给客人</button> | 308 | +<!-- (开启在线预订 显示在线预订) || (未开启在线预订 显示再次预订(打商家电话)) --> |
| 309 | +<!-- (未结束&&未取消 && 开启转发开关 显示 转发邀请函给客人) || (过了当前餐段结束时间||用餐完成||已取消 显示 转发店铺给好友) --> | ||
| 310 | +<view wx:if="{{isMoreBtn || options.isOrder == '1' || (!isMoreBtn && seller.phone) || (detail.status !='4' && isPaymenBtn) || (detail.status !='4' && isShareItem)}}" class="flex-lr sharewidth {{themeColor}}"> | ||
| 311 | + <view wx:if="{{isMoreBtn}}" class="flex-cc font30r moreBtn {{((detail.status !='4' && isPaymenBtn) && ((detail.status !='4' && isShareItem) || options.isOrder == '1')) ? 'threeBtn' : ''}}" bindtap="secondbook">再次预订</view> | ||
| 312 | + <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> | ||
| 313 | + <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> | ||
| 314 | + <button wx:if="{{detail.status !='4' && isShareItem}}" class="flex-cc font30r shareItem" open-type="share">转发邀请函给客人</button> | ||
| 315 | + <button wx:if="{{options.isOrder == '1'}}" class="flex-cc font30r shareItem" data-type="2" open-type="share">转发店铺给好友</button> | ||
| 312 | </view> | 316 | </view> |
| 313 | <painter palette="{{wxml}}" style="position: absolute; top: -9999rpx;" bind:imgOK="onImgOK" /> | 317 | <painter palette="{{wxml}}" style="position: absolute; top: -9999rpx;" bind:imgOK="onImgOK" /> |
| 314 | <my-modal id="payModal" fadeStyle="slideUp" height="240px"> | 318 | <my-modal id="payModal" fadeStyle="slideUp" height="240px"> |
| @@ -306,6 +306,7 @@ Page({ | @@ -306,6 +306,7 @@ Page({ | ||
| 306 | lat: reserev.seller.lat, | 306 | lat: reserev.seller.lat, |
| 307 | long: reserev.seller.long, | 307 | long: reserev.seller.long, |
| 308 | seller_tel: reserev.seller.seller_tel, | 308 | seller_tel: reserev.seller.seller_tel, |
| 309 | + phone:reserev.phone, | ||
| 309 | yearMonthDay, | 310 | yearMonthDay, |
| 310 | yearMonth, | 311 | yearMonth, |
| 311 | dateStr, | 312 | dateStr, |
| @@ -515,25 +516,35 @@ Page({ | @@ -515,25 +516,35 @@ Page({ | ||
| 515 | }) | 516 | }) |
| 516 | console.log('海报生成成功',this.data.imgSrc); | 517 | console.log('海报生成成功',this.data.imgSrc); |
| 517 | }, | 518 | }, |
| 518 | - // 分享 | ||
| 519 | - sharesetting() { | ||
| 520 | - wx.reportMonitor('1017', 1) | 519 | + // 分享 |
| 520 | + sharesetting() { | ||
| 521 | + wx.reportMonitor('1017', 1) | ||
| 521 | this.closeModal() | 522 | this.closeModal() |
| 522 | - let parmdata = { | ||
| 523 | - id: this.id, | ||
| 524 | - fromid: getApp().openid, | ||
| 525 | - hasInvitation: 1, | ||
| 526 | - tplid: this.data.options.tplid | ||
| 527 | - } | ||
| 528 | - if (this.data.options.uid) { | ||
| 529 | - parmdata.uid = this.data.options.uid; | ||
| 530 | - } | ||
| 531 | - return { | ||
| 532 | - title: '我已订好' + this.data.seller.name + ',点击可查看详情并导航到店', | ||
| 533 | - path: util.http_build_query(parmdata, '/pages/customer/detail_owner_invitation_new'), | ||
| 534 | - imageUrl: this.data.imgSrc || 'http://nosqn.colorcun.com/reserve/images/3x/%E6%9A%82%E6%97%A0.png', | ||
| 535 | - } | ||
| 536 | - }, | 523 | + if(this.data.options.isOrder == '1' && this.data.detail.status !='4'){ |
| 524 | + return { | ||
| 525 | + title: '推荐' + this.data.seller.name + ',点击可查看详情并导航到店', | ||
| 526 | + path: util.http_build_query({ | ||
| 527 | + id: this.data.detail.seller.id | ||
| 528 | + }, '/pages/reserve/shopHome'), | ||
| 529 | + imageUrl: this.data.detail.seller.seller_image || 'http://nosqn.colorcun.com/reserve/images/3x/%E6%9A%82%E6%97%A0.png', | ||
| 530 | + } | ||
| 531 | + }else{ | ||
| 532 | + let parmdata = { | ||
| 533 | + id: this.id, | ||
| 534 | + fromid: getApp().openid, | ||
| 535 | + hasInvitation: 1, | ||
| 536 | + tplid: this.data.options.tplid | ||
| 537 | + } | ||
| 538 | + if (this.data.options.uid) { | ||
| 539 | + parmdata.uid = this.data.options.uid; | ||
| 540 | + } | ||
| 541 | + return { | ||
| 542 | + title: '我已订好' + this.data.seller.name + ',点击可查看详情并导航到店', | ||
| 543 | + path: util.http_build_query(parmdata, '/pages/customer/detail_owner_invitation_new'), | ||
| 544 | + imageUrl: this.data.imgSrc || 'http://nosqn.colorcun.com/reserve/images/3x/%E6%9A%82%E6%97%A0.png', | ||
| 545 | + } | ||
| 546 | + } | ||
| 547 | + }, | ||
| 537 | // 修改detail数据 | 548 | // 修改detail数据 |
| 538 | formatDatail(detail, dateSmart) { | 549 | formatDatail(detail, dateSmart) { |
| 539 | detail.rdateStr = dateSmart; | 550 | detail.rdateStr = dateSmart; |
| @@ -608,24 +619,6 @@ Page({ | @@ -608,24 +619,6 @@ Page({ | ||
| 608 | }) | 619 | }) |
| 609 | } | 620 | } |
| 610 | } | 621 | } |
| 611 | - let obj = { | ||
| 612 | - chef, | ||
| 613 | - reserve, | ||
| 614 | - marketing, | ||
| 615 | - signboard, | ||
| 616 | - store, | ||
| 617 | - home, | ||
| 618 | - coupon, | ||
| 619 | - couponList, | ||
| 620 | - swich_phone, | ||
| 621 | - is_comments, | ||
| 622 | - StyleType, | ||
| 623 | - titleType, | ||
| 624 | - themeColor, | ||
| 625 | - } | ||
| 626 | - console.log('获取数据', { | ||
| 627 | - ...obj | ||
| 628 | - }); | ||
| 629 | // 根据券ID获取券详情 | 622 | // 根据券ID获取券详情 |
| 630 | this.getActivityByIdFun(couponList, couponList.length) | 623 | this.getActivityByIdFun(couponList, couponList.length) |
| 631 | // 根据充值ID获取充值详情 | 624 | // 根据充值ID获取充值详情 |
| @@ -645,7 +638,7 @@ Page({ | @@ -645,7 +638,7 @@ Page({ | ||
| 645 | var nightStr = lunchDis.night.split("-"); | 638 | var nightStr = lunchDis.night.split("-"); |
| 646 | var nightArr = lunchDis.night ? this.computeHour(nightStr[0], nightStr[1], 30) : []; | 639 | var nightArr = lunchDis.night ? this.computeHour(nightStr[0], nightStr[1], 30) : []; |
| 647 | timeList = solt == '1' ? morningArr : solt == '2' ? noonArr : solt == '3' ? nightArr : [] | 640 | timeList = solt == '1' ? morningArr : solt == '2' ? noonArr : solt == '3' ? nightArr : [] |
| 648 | - this.setData({ | 641 | + let obj = { |
| 649 | chef, | 642 | chef, |
| 650 | marketing, | 643 | marketing, |
| 651 | home, | 644 | home, |
| @@ -661,6 +654,12 @@ Page({ | @@ -661,6 +654,12 @@ Page({ | ||
| 661 | timeList, | 654 | timeList, |
| 662 | isMoreBtn:marketing && marketing.is_online_book=='1' && this.data.options.onlineReserve == '1', | 655 | isMoreBtn:marketing && marketing.is_online_book=='1' && this.data.options.onlineReserve == '1', |
| 663 | isShareItem: this.data.options.isOrder != '1' && marketing && marketing.is_transpond=='1', | 656 | isShareItem: this.data.options.isOrder != '1' && marketing && marketing.is_transpond=='1', |
| 657 | + } | ||
| 658 | + console.log('获取数据GetSellerTemplateConf--------------------', { | ||
| 659 | + ...obj | ||
| 660 | + }); | ||
| 661 | + this.setData({ | ||
| 662 | + ...obj | ||
| 664 | }) | 663 | }) |
| 665 | // 开启语音播报 | 664 | // 开启语音播报 |
| 666 | if (reserve && reserve.swich_voice == '1') { | 665 | if (reserve && reserve.swich_voice == '1') { |
| @@ -310,10 +310,14 @@ | @@ -310,10 +310,14 @@ | ||
| 310 | {{toastText}} | 310 | {{toastText}} |
| 311 | </view> | 311 | </view> |
| 312 | </scroll-view> | 312 | </scroll-view> |
| 313 | -<view wx:if="{{isMoreBtn || (detail.status !='4' && isPaymenBtn) || (detail.status !='4' && isShareItem)}}" class="flex-lr sharewidth {{themeColor}}"> | ||
| 314 | - <view wx:if="{{isMoreBtn}}" class="flex-cc font30r moreBtn {{(detail.status !='4' && isPaymenBtn && isShareItem) ? 'threeBtn' : ''}}" bindtap="secondbook" >再次预订</view> | ||
| 315 | - <view wx:if="{{detail.status !='4' && isPaymenBtn}}" class="flex-cc font30r paymenBtn {{(isMoreBtn && (detail.status !='4' && isShareItem)) ? 'threeBtn' : ''}}" bindtap="paymentFun">支付定金</view> | 313 | +<!-- (开启在线预订 显示在线预订) || (未开启在线预订 显示再次预订(打商家电话)) --> |
| 314 | +<!-- (未结束&&未取消 && 开启转发开关 显示 转发邀请函给客人) || (过了当前餐段结束时间||用餐完成||已取消 显示 转发店铺给好友) --> | ||
| 315 | +<view wx:if="{{isMoreBtn || options.isOrder == '1' || (!isMoreBtn && seller.phone) || (detail.status !='4' && isPaymenBtn) || (detail.status !='4' && isShareItem)}}" class="flex-lr sharewidth {{themeColor}}"> | ||
| 316 | + <view wx:if="{{isMoreBtn}}" class="flex-cc font30r moreBtn {{((detail.status !='4' && isPaymenBtn) && ((detail.status !='4' && isShareItem) || options.isOrder == '1')) ? 'threeBtn' : ''}}" bindtap="secondbook" >再次预订</view> | ||
| 317 | + <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> | ||
| 318 | + <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> | ||
| 316 | <button wx:if="{{detail.status !='4' && isShareItem}}" class="flex-cc font30r shareItem" open-type="share">转发邀请函给客人</button> | 319 | <button wx:if="{{detail.status !='4' && isShareItem}}" class="flex-cc font30r shareItem" open-type="share">转发邀请函给客人</button> |
| 320 | + <button wx:if="{{options.isOrder == '1'}}" class="flex-cc font30r shareItem" data-type="2" open-type="share">转发店铺给好友</button> | ||
| 317 | </view> | 321 | </view> |
| 318 | <painter palette="{{wxml}}" style="position: absolute; top: -9999rpx;" bind:imgOK="onImgOK" /> | 322 | <painter palette="{{wxml}}" style="position: absolute; top: -9999rpx;" bind:imgOK="onImgOK" /> |
| 319 | <my-modal id="payModal" fadeStyle="slideUp" height="240px"> | 323 | <my-modal id="payModal" fadeStyle="slideUp" height="240px"> |
| @@ -306,6 +306,7 @@ Page({ | @@ -306,6 +306,7 @@ Page({ | ||
| 306 | lat: reserev.seller.lat, | 306 | lat: reserev.seller.lat, |
| 307 | long: reserev.seller.long, | 307 | long: reserev.seller.long, |
| 308 | seller_tel: reserev.seller.seller_tel, | 308 | seller_tel: reserev.seller.seller_tel, |
| 309 | + phone:reserev.phone, | ||
| 309 | yearMonthDay, | 310 | yearMonthDay, |
| 310 | yearMonth, | 311 | yearMonth, |
| 311 | dateStr, | 312 | dateStr, |
| @@ -515,25 +516,35 @@ Page({ | @@ -515,25 +516,35 @@ Page({ | ||
| 515 | }) | 516 | }) |
| 516 | console.log('海报生成成功',this.data.imgSrc); | 517 | console.log('海报生成成功',this.data.imgSrc); |
| 517 | }, | 518 | }, |
| 518 | - // 分享 | ||
| 519 | - sharesetting() { | ||
| 520 | - wx.reportMonitor('1017', 1) | 519 | + // 分享 |
| 520 | + sharesetting() { | ||
| 521 | + wx.reportMonitor('1017', 1) | ||
| 521 | this.closeModal() | 522 | this.closeModal() |
| 522 | - let parmdata = { | ||
| 523 | - id: this.id, | ||
| 524 | - fromid: getApp().openid, | ||
| 525 | - hasInvitation: 1, | ||
| 526 | - tplid: this.data.options.tplid | ||
| 527 | - } | ||
| 528 | - if (this.data.options.uid) { | ||
| 529 | - parmdata.uid = this.data.options.uid; | ||
| 530 | - } | ||
| 531 | - return { | ||
| 532 | - title: '我已订好' + this.data.seller.name + ',点击可查看详情并导航到店', | ||
| 533 | - path: util.http_build_query(parmdata, '/pages/customer/detail_owner_invitation_new'), | ||
| 534 | - imageUrl: this.data.imgSrc || 'http://nosqn.colorcun.com/reserve/images/3x/%E6%9A%82%E6%97%A0.png', | ||
| 535 | - } | ||
| 536 | - }, | 523 | + if(this.data.options.isOrder == '1' && this.data.detail.status !='4'){ |
| 524 | + return { | ||
| 525 | + title: '推荐' + this.data.seller.name + ',点击可查看详情并导航到店', | ||
| 526 | + path: util.http_build_query({ | ||
| 527 | + id: this.data.detail.seller.id | ||
| 528 | + }, '/pages/reserve/shopHome'), | ||
| 529 | + imageUrl: this.data.detail.seller.seller_image || 'http://nosqn.colorcun.com/reserve/images/3x/%E6%9A%82%E6%97%A0.png', | ||
| 530 | + } | ||
| 531 | + }else{ | ||
| 532 | + let parmdata = { | ||
| 533 | + id: this.id, | ||
| 534 | + fromid: getApp().openid, | ||
| 535 | + hasInvitation: 1, | ||
| 536 | + tplid: this.data.options.tplid | ||
| 537 | + } | ||
| 538 | + if (this.data.options.uid) { | ||
| 539 | + parmdata.uid = this.data.options.uid; | ||
| 540 | + } | ||
| 541 | + return { | ||
| 542 | + title: '我已订好' + this.data.seller.name + ',点击可查看详情并导航到店', | ||
| 543 | + path: util.http_build_query(parmdata, '/pages/customer/detail_owner_invitation_new'), | ||
| 544 | + imageUrl: this.data.imgSrc || 'http://nosqn.colorcun.com/reserve/images/3x/%E6%9A%82%E6%97%A0.png', | ||
| 545 | + } | ||
| 546 | + } | ||
| 547 | + }, | ||
| 537 | // 修改detail数据 | 548 | // 修改detail数据 |
| 538 | formatDatail(detail, dateSmart) { | 549 | formatDatail(detail, dateSmart) { |
| 539 | detail.rdateStr = dateSmart; | 550 | detail.rdateStr = dateSmart; |
| @@ -608,24 +619,6 @@ Page({ | @@ -608,24 +619,6 @@ Page({ | ||
| 608 | }) | 619 | }) |
| 609 | } | 620 | } |
| 610 | } | 621 | } |
| 611 | - let obj = { | ||
| 612 | - chef, | ||
| 613 | - reserve, | ||
| 614 | - marketing, | ||
| 615 | - signboard, | ||
| 616 | - store, | ||
| 617 | - home, | ||
| 618 | - coupon, | ||
| 619 | - couponList, | ||
| 620 | - swich_phone, | ||
| 621 | - is_comments, | ||
| 622 | - StyleType, | ||
| 623 | - titleType, | ||
| 624 | - themeColor, | ||
| 625 | - } | ||
| 626 | - console.log('获取数据', { | ||
| 627 | - ...obj | ||
| 628 | - }); | ||
| 629 | // 根据券ID获取券详情 | 622 | // 根据券ID获取券详情 |
| 630 | this.getActivityByIdFun(couponList, couponList.length) | 623 | this.getActivityByIdFun(couponList, couponList.length) |
| 631 | // 根据充值ID获取充值详情 | 624 | // 根据充值ID获取充值详情 |
| @@ -645,7 +638,7 @@ Page({ | @@ -645,7 +638,7 @@ Page({ | ||
| 645 | var nightStr = lunchDis.night.split("-"); | 638 | var nightStr = lunchDis.night.split("-"); |
| 646 | var nightArr = lunchDis.night ? this.computeHour(nightStr[0], nightStr[1], 30) : []; | 639 | var nightArr = lunchDis.night ? this.computeHour(nightStr[0], nightStr[1], 30) : []; |
| 647 | timeList = solt == '1' ? morningArr : solt == '2' ? noonArr : solt == '3' ? nightArr : [] | 640 | timeList = solt == '1' ? morningArr : solt == '2' ? noonArr : solt == '3' ? nightArr : [] |
| 648 | - this.setData({ | 641 | + let obj = { |
| 649 | chef, | 642 | chef, |
| 650 | marketing, | 643 | marketing, |
| 651 | home, | 644 | home, |
| @@ -661,6 +654,12 @@ Page({ | @@ -661,6 +654,12 @@ Page({ | ||
| 661 | timeList, | 654 | timeList, |
| 662 | isMoreBtn:marketing && marketing.is_online_book=='1' && this.data.options.onlineReserve == '1', | 655 | isMoreBtn:marketing && marketing.is_online_book=='1' && this.data.options.onlineReserve == '1', |
| 663 | isShareItem: this.data.options.isOrder != '1' && marketing && marketing.is_transpond=='1', | 656 | isShareItem: this.data.options.isOrder != '1' && marketing && marketing.is_transpond=='1', |
| 657 | + } | ||
| 658 | + console.log('获取数据GetSellerTemplateConf--------------------', { | ||
| 659 | + ...obj | ||
| 660 | + }); | ||
| 661 | + this.setData({ | ||
| 662 | + ...obj | ||
| 664 | }) | 663 | }) |
| 665 | // 开启语音播报 | 664 | // 开启语音播报 |
| 666 | if (reserve && reserve.swich_voice == '1') { | 665 | if (reserve && reserve.swich_voice == '1') { |
| @@ -293,10 +293,14 @@ | @@ -293,10 +293,14 @@ | ||
| 293 | {{toastText}} | 293 | {{toastText}} |
| 294 | </view> | 294 | </view> |
| 295 | </scroll-view> | 295 | </scroll-view> |
| 296 | -<view wx:if="{{isMoreBtn || (detail.status !='4' && isPaymenBtn) || (detail.status !='4' && isShareItem)}}" class="flex-lr sharewidth {{themeColor}}"> | ||
| 297 | - <view wx:if="{{isMoreBtn}}" class="flex-cc font30r moreBtn {{(detail.status !='4' && isPaymenBtn && isShareItem) ? 'threeBtn' : ''}}" bindtap="secondbook">再次预订</view> | ||
| 298 | - <view wx:if="{{detail.status !='4' && isPaymenBtn}}" class="flex-cc font30r paymenBtn {{(isMoreBtn && (detail.status !='4' && isShareItem)) ? 'threeBtn' : ''}}" bindtap="paymentFun">支付定金</view> | 296 | +<!-- (开启在线预订 显示在线预订) || (未开启在线预订 显示再次预订(打商家电话)) --> |
| 297 | +<!-- (未结束&&未取消 && 开启转发开关 显示 转发邀请函给客人) || (过了当前餐段结束时间||用餐完成||已取消 显示 转发店铺给好友) --> | ||
| 298 | +<view wx:if="{{isMoreBtn || options.isOrder == '1' || (!isMoreBtn && seller.phone) || (detail.status !='4' && isPaymenBtn) || (detail.status !='4' && isShareItem)}}" class="flex-lr sharewidth {{themeColor}}"> | ||
| 299 | + <view wx:if="{{isMoreBtn}}" class="flex-cc font30r moreBtn {{((detail.status !='4' && isPaymenBtn) && ((detail.status !='4' && isShareItem) || options.isOrder == '1')) ? 'threeBtn' : ''}}" bindtap="secondbook">再次预订</view> | ||
| 300 | + <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> | ||
| 301 | + <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> | ||
| 299 | <button wx:if="{{detail.status !='4' && isShareItem}}" class="flex-cc font30r shareItem" open-type="share">转发邀请函给客人</button> | 302 | <button wx:if="{{detail.status !='4' && isShareItem}}" class="flex-cc font30r shareItem" open-type="share">转发邀请函给客人</button> |
| 303 | + <button wx:if="{{options.isOrder == '1'}}" class="flex-cc font30r shareItem" data-type="2" open-type="share">转发店铺给好友</button> | ||
| 300 | </view> | 304 | </view> |
| 301 | <painter palette="{{wxml}}" style="position: absolute; top: -9999rpx;" bind:imgOK="onImgOK" /> | 305 | <painter palette="{{wxml}}" style="position: absolute; top: -9999rpx;" bind:imgOK="onImgOK" /> |
| 302 | <my-modal id="payModal" fadeStyle="slideUp" height="240px"> | 306 | <my-modal id="payModal" fadeStyle="slideUp" height="240px"> |
| @@ -305,6 +305,7 @@ Page({ | @@ -305,6 +305,7 @@ Page({ | ||
| 305 | lat: reserev.seller.lat, | 305 | lat: reserev.seller.lat, |
| 306 | long: reserev.seller.long, | 306 | long: reserev.seller.long, |
| 307 | seller_tel: reserev.seller.seller_tel, | 307 | seller_tel: reserev.seller.seller_tel, |
| 308 | + phone:reserev.phone, | ||
| 308 | yearMonthDay, | 309 | yearMonthDay, |
| 309 | yearMonth, | 310 | yearMonth, |
| 310 | dateStr, | 311 | dateStr, |
| @@ -514,25 +515,35 @@ Page({ | @@ -514,25 +515,35 @@ Page({ | ||
| 514 | }) | 515 | }) |
| 515 | console.log('海报生成成功',this.data.imgSrc); | 516 | console.log('海报生成成功',this.data.imgSrc); |
| 516 | }, | 517 | }, |
| 517 | - // 分享 | ||
| 518 | - sharesetting() { | ||
| 519 | - wx.reportMonitor('1017', 1) | 518 | + // 分享 |
| 519 | + sharesetting() { | ||
| 520 | + wx.reportMonitor('1017', 1) | ||
| 520 | this.closeModal() | 521 | this.closeModal() |
| 521 | - let parmdata = { | ||
| 522 | - id: this.id, | ||
| 523 | - fromid: getApp().openid, | ||
| 524 | - hasInvitation: 1, | ||
| 525 | - tplid: this.data.options.tplid | ||
| 526 | - } | ||
| 527 | - if (this.data.options.uid) { | ||
| 528 | - parmdata.uid = this.data.options.uid; | ||
| 529 | - } | ||
| 530 | - return { | ||
| 531 | - title: '我已订好' + this.data.seller.name + ',点击可查看详情并导航到店', | ||
| 532 | - path: util.http_build_query(parmdata, '/pages/customer/detail_owner_invitation_new'), | ||
| 533 | - imageUrl: this.data.imgSrc || 'http://nosqn.colorcun.com/reserve/images/3x/%E6%9A%82%E6%97%A0.png', | ||
| 534 | - } | ||
| 535 | - }, | 522 | + if(this.data.options.isOrder == '1' && this.data.detail.status !='4'){ |
| 523 | + return { | ||
| 524 | + title: '推荐' + this.data.seller.name + ',点击可查看详情并导航到店', | ||
| 525 | + path: util.http_build_query({ | ||
| 526 | + id: this.data.detail.seller.id | ||
| 527 | + }, '/pages/reserve/shopHome'), | ||
| 528 | + imageUrl: this.data.detail.seller.seller_image || 'http://nosqn.colorcun.com/reserve/images/3x/%E6%9A%82%E6%97%A0.png', | ||
| 529 | + } | ||
| 530 | + }else{ | ||
| 531 | + let parmdata = { | ||
| 532 | + id: this.id, | ||
| 533 | + fromid: getApp().openid, | ||
| 534 | + hasInvitation: 1, | ||
| 535 | + tplid: this.data.options.tplid | ||
| 536 | + } | ||
| 537 | + if (this.data.options.uid) { | ||
| 538 | + parmdata.uid = this.data.options.uid; | ||
| 539 | + } | ||
| 540 | + return { | ||
| 541 | + title: '我已订好' + this.data.seller.name + ',点击可查看详情并导航到店', | ||
| 542 | + path: util.http_build_query(parmdata, '/pages/customer/detail_owner_invitation_new'), | ||
| 543 | + imageUrl: this.data.imgSrc || 'http://nosqn.colorcun.com/reserve/images/3x/%E6%9A%82%E6%97%A0.png', | ||
| 544 | + } | ||
| 545 | + } | ||
| 546 | + }, | ||
| 536 | // 修改detail数据 | 547 | // 修改detail数据 |
| 537 | formatDatail(detail, dateSmart) { | 548 | formatDatail(detail, dateSmart) { |
| 538 | detail.rdateStr = dateSmart; | 549 | detail.rdateStr = dateSmart; |
| @@ -607,24 +618,6 @@ Page({ | @@ -607,24 +618,6 @@ Page({ | ||
| 607 | }) | 618 | }) |
| 608 | } | 619 | } |
| 609 | } | 620 | } |
| 610 | - let obj = { | ||
| 611 | - chef, | ||
| 612 | - reserve, | ||
| 613 | - marketing, | ||
| 614 | - signboard, | ||
| 615 | - store, | ||
| 616 | - home, | ||
| 617 | - coupon, | ||
| 618 | - couponList, | ||
| 619 | - swich_phone, | ||
| 620 | - is_comments, | ||
| 621 | - StyleType, | ||
| 622 | - titleType, | ||
| 623 | - themeColor, | ||
| 624 | - } | ||
| 625 | - console.log('获取数据', { | ||
| 626 | - ...obj | ||
| 627 | - }); | ||
| 628 | // 根据券ID获取券详情 | 621 | // 根据券ID获取券详情 |
| 629 | this.getActivityByIdFun(couponList, couponList.length) | 622 | this.getActivityByIdFun(couponList, couponList.length) |
| 630 | // 根据充值ID获取充值详情 | 623 | // 根据充值ID获取充值详情 |
| @@ -644,7 +637,7 @@ Page({ | @@ -644,7 +637,7 @@ Page({ | ||
| 644 | var nightStr = lunchDis.night.split("-"); | 637 | var nightStr = lunchDis.night.split("-"); |
| 645 | var nightArr = lunchDis.night ? this.computeHour(nightStr[0], nightStr[1], 30) : []; | 638 | var nightArr = lunchDis.night ? this.computeHour(nightStr[0], nightStr[1], 30) : []; |
| 646 | timeList = solt == '1' ? morningArr : solt == '2' ? noonArr : solt == '3' ? nightArr : [] | 639 | timeList = solt == '1' ? morningArr : solt == '2' ? noonArr : solt == '3' ? nightArr : [] |
| 647 | - this.setData({ | 640 | + let obj = { |
| 648 | chef, | 641 | chef, |
| 649 | marketing, | 642 | marketing, |
| 650 | home, | 643 | home, |
| @@ -660,6 +653,12 @@ Page({ | @@ -660,6 +653,12 @@ Page({ | ||
| 660 | timeList, | 653 | timeList, |
| 661 | isMoreBtn:marketing && marketing.is_online_book=='1' && this.data.options.onlineReserve == '1', | 654 | isMoreBtn:marketing && marketing.is_online_book=='1' && this.data.options.onlineReserve == '1', |
| 662 | isShareItem: this.data.options.isOrder != '1' && marketing && marketing.is_transpond=='1', | 655 | isShareItem: this.data.options.isOrder != '1' && marketing && marketing.is_transpond=='1', |
| 656 | + } | ||
| 657 | + console.log('获取数据GetSellerTemplateConf--------------------', { | ||
| 658 | + ...obj | ||
| 659 | + }); | ||
| 660 | + this.setData({ | ||
| 661 | + ...obj | ||
| 663 | }) | 662 | }) |
| 664 | // 开启语音播报 | 663 | // 开启语音播报 |
| 665 | if (reserve && reserve.swich_voice == '1') { | 664 | if (reserve && reserve.swich_voice == '1') { |
| @@ -292,10 +292,14 @@ | @@ -292,10 +292,14 @@ | ||
| 292 | {{toastText}} | 292 | {{toastText}} |
| 293 | </view> | 293 | </view> |
| 294 | </scroll-view> | 294 | </scroll-view> |
| 295 | -<view wx:if="{{isMoreBtn || (detail.status !='4' && isPaymenBtn) || (detail.status !='4' && isShareItem)}}" class="flex-lr sharewidth {{themeColor}}"> | ||
| 296 | - <view wx:if="{{isMoreBtn}}" class="flex-cc font30r moreBtn {{(detail.status !='4' && isPaymenBtn && isShareItem) ? 'threeBtn' : ''}}" bindtap="secondbook">再次预订</view> | ||
| 297 | - <view wx:if="{{detail.status !='4' && isPaymenBtn}}" class="flex-cc font30r paymenBtn {{(isMoreBtn && (detail.status !='4' && isShareItem)) ? 'threeBtn' : ''}}" bindtap="paymentFun">支付定金</view> | 295 | +<!-- (开启在线预订 显示在线预订) || (未开启在线预订 显示再次预订(打商家电话)) --> |
| 296 | +<!-- (未结束&&未取消 && 开启转发开关 显示 转发邀请函给客人) || (过了当前餐段结束时间||用餐完成||已取消 显示 转发店铺给好友) --> | ||
| 297 | +<view wx:if="{{isMoreBtn || options.isOrder == '1' || (!isMoreBtn && seller.phone) || (detail.status !='4' && isPaymenBtn) || (detail.status !='4' && isShareItem)}}" class="flex-lr sharewidth {{themeColor}}"> | ||
| 298 | + <view wx:if="{{isMoreBtn}}" class="flex-cc font30r moreBtn {{((detail.status !='4' && isPaymenBtn) && ((detail.status !='4' && isShareItem) || options.isOrder == '1')) ? 'threeBtn' : ''}}" bindtap="secondbook">再次预订</view> | ||
| 299 | + <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> | ||
| 300 | + <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> | ||
| 298 | <button wx:if="{{detail.status !='4' && isShareItem}}" class="flex-cc font30r shareItem" open-type="share">转发邀请函给客人</button> | 301 | <button wx:if="{{detail.status !='4' && isShareItem}}" class="flex-cc font30r shareItem" open-type="share">转发邀请函给客人</button> |
| 302 | + <button wx:if="{{options.isOrder == '1'}}" class="flex-cc font30r shareItem" data-type="2" open-type="share">转发店铺给好友</button> | ||
| 299 | </view> | 303 | </view> |
| 300 | <painter palette="{{wxml}}" style="position: absolute; top: -9999rpx;" bind:imgOK="onImgOK" /> | 304 | <painter palette="{{wxml}}" style="position: absolute; top: -9999rpx;" bind:imgOK="onImgOK" /> |
| 301 | <my-modal id="payModal" fadeStyle="slideUp" height="240px"> | 305 | <my-modal id="payModal" fadeStyle="slideUp" height="240px"> |
| @@ -260,6 +260,7 @@ Page({ | @@ -260,6 +260,7 @@ Page({ | ||
| 260 | lat: reserev.seller.lat, | 260 | lat: reserev.seller.lat, |
| 261 | long: reserev.seller.long, | 261 | long: reserev.seller.long, |
| 262 | seller_tel: reserev.seller.seller_tel, | 262 | seller_tel: reserev.seller.seller_tel, |
| 263 | + phone:reserev.phone, | ||
| 263 | yearMonthDay, | 264 | yearMonthDay, |
| 264 | yearMonth, | 265 | yearMonth, |
| 265 | dateStr, | 266 | dateStr, |
| @@ -467,22 +468,33 @@ Page({ | @@ -467,22 +468,33 @@ Page({ | ||
| 467 | }) | 468 | }) |
| 468 | console.log('海报生成成功',this.data.imgSrc); | 469 | console.log('海报生成成功',this.data.imgSrc); |
| 469 | }, | 470 | }, |
| 471 | + // 分享 | ||
| 470 | sharesetting() { | 472 | sharesetting() { |
| 471 | wx.reportMonitor('1017', 1) | 473 | wx.reportMonitor('1017', 1) |
| 472 | this.closeModal() | 474 | this.closeModal() |
| 473 | - let parmdata = { | ||
| 474 | - id: this.id, | ||
| 475 | - fromid: getApp().openid, | ||
| 476 | - hasInvitation: 1, | ||
| 477 | - tplid: this.data.options.tplid | ||
| 478 | - } | ||
| 479 | - if (this.data.options.uid) { | ||
| 480 | - parmdata.uid = this.data.options.uid; | ||
| 481 | - } | ||
| 482 | - return { | ||
| 483 | - title: '我已订好' + this.data.seller.name + ',点击可查看详情并导航到店', | ||
| 484 | - path: util.http_build_query(parmdata, '/pages/customer/detail_owner_invitation_new'), | ||
| 485 | - imageUrl: this.data.imgSrc || 'http://nosqn.colorcun.com/reserve/images/3x/%E6%9A%82%E6%97%A0.png', | 475 | + if(this.data.options.isOrder == '1' && this.data.detail.status !='4'){ |
| 476 | + return { | ||
| 477 | + title: '推荐' + this.data.seller.name + ',点击可查看详情并导航到店', | ||
| 478 | + path: util.http_build_query({ | ||
| 479 | + id: this.data.detail.seller.id | ||
| 480 | + }, '/pages/reserve/shopHome'), | ||
| 481 | + imageUrl: this.data.detail.seller.seller_image || 'http://nosqn.colorcun.com/reserve/images/3x/%E6%9A%82%E6%97%A0.png', | ||
| 482 | + } | ||
| 483 | + }else{ | ||
| 484 | + let parmdata = { | ||
| 485 | + id: this.id, | ||
| 486 | + fromid: getApp().openid, | ||
| 487 | + hasInvitation: 1, | ||
| 488 | + tplid: this.data.options.tplid | ||
| 489 | + } | ||
| 490 | + if (this.data.options.uid) { | ||
| 491 | + parmdata.uid = this.data.options.uid; | ||
| 492 | + } | ||
| 493 | + return { | ||
| 494 | + title: '我已订好' + this.data.seller.name + ',点击可查看详情并导航到店', | ||
| 495 | + path: util.http_build_query(parmdata, '/pages/customer/detail_owner_invitation_new'), | ||
| 496 | + imageUrl: this.data.imgSrc || 'http://nosqn.colorcun.com/reserve/images/3x/%E6%9A%82%E6%97%A0.png', | ||
| 497 | + } | ||
| 486 | } | 498 | } |
| 487 | }, | 499 | }, |
| 488 | formatDatail(detail, dateSmart) { | 500 | formatDatail(detail, dateSmart) { |
| @@ -557,24 +569,6 @@ Page({ | @@ -557,24 +569,6 @@ Page({ | ||
| 557 | }) | 569 | }) |
| 558 | } | 570 | } |
| 559 | } | 571 | } |
| 560 | - let obj = { | ||
| 561 | - chef, | ||
| 562 | - reserve, | ||
| 563 | - marketing, | ||
| 564 | - signboard, | ||
| 565 | - store, | ||
| 566 | - home, | ||
| 567 | - coupon, | ||
| 568 | - couponList, | ||
| 569 | - swich_phone, | ||
| 570 | - is_comments, | ||
| 571 | - StyleType, | ||
| 572 | - titleType, | ||
| 573 | - themeColor, | ||
| 574 | - } | ||
| 575 | - console.log('获取数据', { | ||
| 576 | - ...obj | ||
| 577 | - }); | ||
| 578 | // 根据券ID获取券详情 | 572 | // 根据券ID获取券详情 |
| 579 | this.getActivityByIdFun(couponList, couponList.length) | 573 | this.getActivityByIdFun(couponList, couponList.length) |
| 580 | // 根据充值ID获取充值详情 | 574 | // 根据充值ID获取充值详情 |
| @@ -599,7 +593,7 @@ Page({ | @@ -599,7 +593,7 @@ Page({ | ||
| 599 | var nightStr = lunchDis.night.split("-"); | 593 | var nightStr = lunchDis.night.split("-"); |
| 600 | var nightArr = lunchDis.night ? this.computeHour(nightStr[0], nightStr[1], 30) : []; | 594 | var nightArr = lunchDis.night ? this.computeHour(nightStr[0], nightStr[1], 30) : []; |
| 601 | timeList = solt == '1' ? morningArr : solt == '2' ? noonArr : solt == '3' ? nightArr : [] | 595 | timeList = solt == '1' ? morningArr : solt == '2' ? noonArr : solt == '3' ? nightArr : [] |
| 602 | - this.setData({ | 596 | + let obj = { |
| 603 | chef, | 597 | chef, |
| 604 | marketing, | 598 | marketing, |
| 605 | home, | 599 | home, |
| @@ -616,7 +610,13 @@ Page({ | @@ -616,7 +610,13 @@ Page({ | ||
| 616 | timeList, | 610 | timeList, |
| 617 | isMoreBtn:marketing && marketing.is_online_book=='1' && this.data.options.onlineReserve == '1', | 611 | isMoreBtn:marketing && marketing.is_online_book=='1' && this.data.options.onlineReserve == '1', |
| 618 | isShareItem: this.data.options.isOrder != '1' && marketing && marketing.is_transpond=='1', | 612 | isShareItem: this.data.options.isOrder != '1' && marketing && marketing.is_transpond=='1', |
| 619 | - }) | 613 | + } |
| 614 | + console.log('获取数据GetSellerTemplateConf--------------------', { | ||
| 615 | + ...obj | ||
| 616 | + }); | ||
| 617 | + this.setData({ | ||
| 618 | + ...obj | ||
| 619 | + }) | ||
| 620 | // 开启语音播报 | 620 | // 开启语音播报 |
| 621 | if (reserve && reserve.swich_voice == '1') { | 621 | if (reserve && reserve.swich_voice == '1') { |
| 622 | this.setData({ | 622 | this.setData({ |
| @@ -279,10 +279,14 @@ | @@ -279,10 +279,14 @@ | ||
| 279 | {{toastText}} | 279 | {{toastText}} |
| 280 | </view> | 280 | </view> |
| 281 | </scroll-view> | 281 | </scroll-view> |
| 282 | -<view wx:if="{{isMoreBtn || (detail.status !='4' && isPaymenBtn) || (detail.status !='4' && isShareItem)}}" class="all-button flex-lr sharewidth"> | ||
| 283 | - <view wx:if="{{isMoreBtn}}" class="flex-cc font30r moreBtn {{(detail.status !='4' && isPaymenBtn && isShareItem) ? 'threeBtn' : ''}}" bindtap="secondbook">再次预订</view> | ||
| 284 | - <view wx:if="{{detail.status !='4' && isPaymenBtn}}" class="flex-cc font30r paymenBtn {{(isMoreBtn && (detail.status !='4' && isShareItem)) ? 'threeBtn' : ''}}" bindtap="paymentFun">支付定金</view> | 282 | +<!-- (开启在线预订 显示在线预订) || (未开启在线预订 显示再次预订(打商家电话)) --> |
| 283 | +<!-- (未结束&&未取消 && 开启转发开关 显示 转发邀请函给客人) || (过了当前餐段结束时间||用餐完成||已取消 显示 转发店铺给好友) --> | ||
| 284 | +<view wx:if="{{isMoreBtn || options.isOrder == '1' || (!isMoreBtn && seller.phone) || (detail.status !='4' && isPaymenBtn) || (detail.status !='4' && isShareItem)}}" class="all-button flex-lr sharewidth"> | ||
| 285 | + <view wx:if="{{isMoreBtn}}" class="flex-cc font30r moreBtn {{((detail.status !='4' && isPaymenBtn) && ((detail.status !='4' && isShareItem) || options.isOrder == '1')) ? 'threeBtn' : ''}}" bindtap="secondbook">再次预订</view> | ||
| 286 | + <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> | ||
| 287 | + <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> | ||
| 285 | <button wx:if="{{detail.status !='4' && isShareItem}}" class="flex-cc font30r shareItem" open-type="share">转发邀请函给客人</button> | 288 | <button wx:if="{{detail.status !='4' && isShareItem}}" class="flex-cc font30r shareItem" open-type="share">转发邀请函给客人</button> |
| 289 | + <button wx:if="{{options.isOrder == '1'}}" class="flex-cc font30r shareItem" data-type="2" open-type="share">转发店铺给好友</button> | ||
| 286 | </view> | 290 | </view> |
| 287 | <painter palette="{{wxml}}" style="position: absolute; top: -9999rpx;" bind:imgOK="onImgOK" /> | 291 | <painter palette="{{wxml}}" style="position: absolute; top: -9999rpx;" bind:imgOK="onImgOK" /> |
| 288 | <my-modal id="payModal" fadeStyle="slideUp" height="240px"> | 292 | <my-modal id="payModal" fadeStyle="slideUp" height="240px"> |
| @@ -306,6 +306,7 @@ Page({ | @@ -306,6 +306,7 @@ Page({ | ||
| 306 | lat: reserev.seller.lat, | 306 | lat: reserev.seller.lat, |
| 307 | long: reserev.seller.long, | 307 | long: reserev.seller.long, |
| 308 | seller_tel: reserev.seller.seller_tel, | 308 | seller_tel: reserev.seller.seller_tel, |
| 309 | + phone:reserev.phone, | ||
| 309 | yearMonthDay, | 310 | yearMonthDay, |
| 310 | yearMonth, | 311 | yearMonth, |
| 311 | dateStr, | 312 | dateStr, |
| @@ -515,25 +516,35 @@ Page({ | @@ -515,25 +516,35 @@ Page({ | ||
| 515 | }) | 516 | }) |
| 516 | console.log('海报生成成功',this.data.imgSrc); | 517 | console.log('海报生成成功',this.data.imgSrc); |
| 517 | }, | 518 | }, |
| 518 | - // 分享 | ||
| 519 | - sharesetting() { | ||
| 520 | - wx.reportMonitor('1017', 1) | 519 | + // 分享 |
| 520 | + sharesetting() { | ||
| 521 | + wx.reportMonitor('1017', 1) | ||
| 521 | this.closeModal() | 522 | this.closeModal() |
| 522 | - let parmdata = { | ||
| 523 | - id: this.id, | ||
| 524 | - fromid: getApp().openid, | ||
| 525 | - hasInvitation: 1, | ||
| 526 | - tplid: this.data.options.tplid | ||
| 527 | - } | ||
| 528 | - if (this.data.options.uid) { | ||
| 529 | - parmdata.uid = this.data.options.uid; | ||
| 530 | - } | ||
| 531 | - return { | ||
| 532 | - title: '我已订好' + this.data.seller.name + ',点击可查看详情并导航到店', | ||
| 533 | - path: util.http_build_query(parmdata, '/pages/customer/detail_owner_invitation_new'), | ||
| 534 | - imageUrl: this.data.imgSrc || 'http://nosqn.colorcun.com/reserve/images/3x/%E6%9A%82%E6%97%A0.png', | ||
| 535 | - } | ||
| 536 | - }, | 523 | + if(this.data.options.isOrder == '1' && this.data.detail.status !='4'){ |
| 524 | + return { | ||
| 525 | + title: '推荐' + this.data.seller.name + ',点击可查看详情并导航到店', | ||
| 526 | + path: util.http_build_query({ | ||
| 527 | + id: this.data.detail.seller.id | ||
| 528 | + }, '/pages/reserve/shopHome'), | ||
| 529 | + imageUrl: this.data.detail.seller.seller_image || 'http://nosqn.colorcun.com/reserve/images/3x/%E6%9A%82%E6%97%A0.png', | ||
| 530 | + } | ||
| 531 | + }else{ | ||
| 532 | + let parmdata = { | ||
| 533 | + id: this.id, | ||
| 534 | + fromid: getApp().openid, | ||
| 535 | + hasInvitation: 1, | ||
| 536 | + tplid: this.data.options.tplid | ||
| 537 | + } | ||
| 538 | + if (this.data.options.uid) { | ||
| 539 | + parmdata.uid = this.data.options.uid; | ||
| 540 | + } | ||
| 541 | + return { | ||
| 542 | + title: '我已订好' + this.data.seller.name + ',点击可查看详情并导航到店', | ||
| 543 | + path: util.http_build_query(parmdata, '/pages/customer/detail_owner_invitation_new'), | ||
| 544 | + imageUrl: this.data.imgSrc || 'http://nosqn.colorcun.com/reserve/images/3x/%E6%9A%82%E6%97%A0.png', | ||
| 545 | + } | ||
| 546 | + } | ||
| 547 | + }, | ||
| 537 | // 修改detail数据 | 548 | // 修改detail数据 |
| 538 | formatDatail(detail, dateSmart) { | 549 | formatDatail(detail, dateSmart) { |
| 539 | detail.rdateStr = dateSmart; | 550 | detail.rdateStr = dateSmart; |
| @@ -608,24 +619,6 @@ Page({ | @@ -608,24 +619,6 @@ Page({ | ||
| 608 | }) | 619 | }) |
| 609 | } | 620 | } |
| 610 | } | 621 | } |
| 611 | - let obj = { | ||
| 612 | - chef, | ||
| 613 | - reserve, | ||
| 614 | - marketing, | ||
| 615 | - signboard, | ||
| 616 | - store, | ||
| 617 | - home, | ||
| 618 | - coupon, | ||
| 619 | - couponList, | ||
| 620 | - swich_phone, | ||
| 621 | - is_comments, | ||
| 622 | - StyleType, | ||
| 623 | - titleType, | ||
| 624 | - themeColor, | ||
| 625 | - } | ||
| 626 | - console.log('获取数据', { | ||
| 627 | - ...obj | ||
| 628 | - }); | ||
| 629 | // 根据券ID获取券详情 | 622 | // 根据券ID获取券详情 |
| 630 | this.getActivityByIdFun(couponList, couponList.length) | 623 | this.getActivityByIdFun(couponList, couponList.length) |
| 631 | // 根据充值ID获取充值详情 | 624 | // 根据充值ID获取充值详情 |
| @@ -645,7 +638,7 @@ Page({ | @@ -645,7 +638,7 @@ Page({ | ||
| 645 | var nightStr = lunchDis.night.split("-"); | 638 | var nightStr = lunchDis.night.split("-"); |
| 646 | var nightArr = lunchDis.night ? this.computeHour(nightStr[0], nightStr[1], 30) : []; | 639 | var nightArr = lunchDis.night ? this.computeHour(nightStr[0], nightStr[1], 30) : []; |
| 647 | timeList = solt == '1' ? morningArr : solt == '2' ? noonArr : solt == '3' ? nightArr : [] | 640 | timeList = solt == '1' ? morningArr : solt == '2' ? noonArr : solt == '3' ? nightArr : [] |
| 648 | - this.setData({ | 641 | + let obj = { |
| 649 | chef, | 642 | chef, |
| 650 | marketing, | 643 | marketing, |
| 651 | home, | 644 | home, |
| @@ -661,6 +654,12 @@ Page({ | @@ -661,6 +654,12 @@ Page({ | ||
| 661 | timeList, | 654 | timeList, |
| 662 | isMoreBtn:marketing && marketing.is_online_book=='1' && this.data.options.onlineReserve == '1', | 655 | isMoreBtn:marketing && marketing.is_online_book=='1' && this.data.options.onlineReserve == '1', |
| 663 | isShareItem: this.data.options.isOrder != '1' && marketing && marketing.is_transpond=='1', | 656 | isShareItem: this.data.options.isOrder != '1' && marketing && marketing.is_transpond=='1', |
| 657 | + } | ||
| 658 | + console.log('获取数据GetSellerTemplateConf--------------------', { | ||
| 659 | + ...obj | ||
| 660 | + }); | ||
| 661 | + this.setData({ | ||
| 662 | + ...obj | ||
| 664 | }) | 663 | }) |
| 665 | // 开启语音播报 | 664 | // 开启语音播报 |
| 666 | if (reserve && reserve.swich_voice == '1') { | 665 | if (reserve && reserve.swich_voice == '1') { |
| @@ -305,10 +305,14 @@ | @@ -305,10 +305,14 @@ | ||
| 305 | {{toastText}} | 305 | {{toastText}} |
| 306 | </view> | 306 | </view> |
| 307 | </scroll-view> | 307 | </scroll-view> |
| 308 | -<view wx:if="{{isMoreBtn || (detail.status !='4' && isPaymenBtn) || (detail.status !='4' && isShareItem)}}" class="flex-lr sharewidth {{themeColor}}"> | ||
| 309 | - <view wx:if="{{isMoreBtn}}" class="flex-cc font30r moreBtn {{(detail.status !='4' && isPaymenBtn && isShareItem) ? 'threeBtn' : ''}}" bindtap="secondbook">再次预订</view> | ||
| 310 | - <view wx:if="{{detail.status !='4' && isPaymenBtn}}" class="flex-cc font30r paymenBtn {{(isMoreBtn && (detail.status !='4' && isShareItem)) ? 'threeBtn' : ''}}" bindtap="paymentFun">支付定金</view> | 308 | +<!-- (开启在线预订 显示在线预订) || (未开启在线预订 显示再次预订(打商家电话)) --> |
| 309 | +<!-- (未结束&&未取消 && 开启转发开关 显示 转发邀请函给客人) || (过了当前餐段结束时间||用餐完成||已取消 显示 转发店铺给好友) --> | ||
| 310 | +<view wx:if="{{isMoreBtn || options.isOrder == '1' || (!isMoreBtn && seller.phone) || (detail.status !='4' && isPaymenBtn) || (detail.status !='4' && isShareItem)}}" class="flex-lr sharewidth {{themeColor}}"> | ||
| 311 | + <view wx:if="{{isMoreBtn}}" class="flex-cc font30r moreBtn {{((detail.status !='4' && isPaymenBtn) && ((detail.status !='4' && isShareItem) || options.isOrder == '1')) ? 'threeBtn' : ''}}" bindtap="secondbook">再次预订</view> | ||
| 312 | + <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> | ||
| 313 | + <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> | ||
| 311 | <button wx:if="{{detail.status !='4' && isShareItem}}" class="flex-cc font30r shareItem" open-type="share">转发邀请函给客人</button> | 314 | <button wx:if="{{detail.status !='4' && isShareItem}}" class="flex-cc font30r shareItem" open-type="share">转发邀请函给客人</button> |
| 315 | + <button wx:if="{{options.isOrder == '1'}}" class="flex-cc font30r shareItem" data-type="2" open-type="share">转发店铺给好友</button> | ||
| 312 | </view> | 316 | </view> |
| 313 | <painter palette="{{wxml}}" style="position: absolute; top: -9999rpx;" bind:imgOK="onImgOK" /> | 317 | <painter palette="{{wxml}}" style="position: absolute; top: -9999rpx;" bind:imgOK="onImgOK" /> |
| 314 | <my-modal id="payModal" fadeStyle="slideUp" height="240px"> | 318 | <my-modal id="payModal" fadeStyle="slideUp" height="240px"> |
| @@ -300,6 +300,7 @@ Page({ | @@ -300,6 +300,7 @@ Page({ | ||
| 300 | is_set_ddate: reserev.is_set_ddate, | 300 | is_set_ddate: reserev.is_set_ddate, |
| 301 | hasUpTime: reserev.type == 1 && reserev.hasRunning && reserev.status != 2, | 301 | hasUpTime: reserev.type == 1 && reserev.hasRunning && reserev.status != 2, |
| 302 | tel: reserev.seller.seller_tel.split(','), | 302 | tel: reserev.seller.seller_tel.split(','), |
| 303 | + phone:reserev.phone, | ||
| 303 | soltName: reserev.soltName, | 304 | soltName: reserev.soltName, |
| 304 | dateTime:util.unixtoTime(reserev.ddate, 'HH:II'), | 305 | dateTime:util.unixtoTime(reserev.ddate, 'HH:II'), |
| 305 | time: util.unixtoTime(reserev.ddate, '星期WW HH:II'), | 306 | time: util.unixtoTime(reserev.ddate, '星期WW HH:II'), |
| @@ -514,25 +515,35 @@ Page({ | @@ -514,25 +515,35 @@ Page({ | ||
| 514 | }) | 515 | }) |
| 515 | console.log('海报生成成功',this.data.imgSrc); | 516 | console.log('海报生成成功',this.data.imgSrc); |
| 516 | }, | 517 | }, |
| 517 | - // 分享 | ||
| 518 | - sharesetting() { | ||
| 519 | - wx.reportMonitor('1017', 1) | 518 | + // 分享 |
| 519 | + sharesetting() { | ||
| 520 | + wx.reportMonitor('1017', 1) | ||
| 520 | this.closeModal() | 521 | this.closeModal() |
| 521 | - let parmdata = { | ||
| 522 | - id: this.id, | ||
| 523 | - fromid: getApp().openid, | ||
| 524 | - hasInvitation: 1, | ||
| 525 | - tplid: this.data.options.tplid | ||
| 526 | - } | ||
| 527 | - if (this.data.options.uid) { | ||
| 528 | - parmdata.uid = this.data.options.uid; | ||
| 529 | - } | ||
| 530 | - return { | ||
| 531 | - title: '我已订好' + this.data.seller.name + ',点击可查看详情并导航到店', | ||
| 532 | - path: util.http_build_query(parmdata, '/pages/customer/detail_owner_invitation_new'), | ||
| 533 | - imageUrl: this.data.imgSrc || 'http://nosqn.colorcun.com/reserve/images/3x/%E6%9A%82%E6%97%A0.png', | ||
| 534 | - } | ||
| 535 | - }, | 522 | + if(this.data.options.isOrder == '1' && this.data.detail.status !='4'){ |
| 523 | + return { | ||
| 524 | + title: '推荐' + this.data.seller.name + ',点击可查看详情并导航到店', | ||
| 525 | + path: util.http_build_query({ | ||
| 526 | + id: this.data.detail.seller.id | ||
| 527 | + }, '/pages/reserve/shopHome'), | ||
| 528 | + imageUrl: this.data.detail.seller.seller_image || 'http://nosqn.colorcun.com/reserve/images/3x/%E6%9A%82%E6%97%A0.png', | ||
| 529 | + } | ||
| 530 | + }else{ | ||
| 531 | + let parmdata = { | ||
| 532 | + id: this.id, | ||
| 533 | + fromid: getApp().openid, | ||
| 534 | + hasInvitation: 1, | ||
| 535 | + tplid: this.data.options.tplid | ||
| 536 | + } | ||
| 537 | + if (this.data.options.uid) { | ||
| 538 | + parmdata.uid = this.data.options.uid; | ||
| 539 | + } | ||
| 540 | + return { | ||
| 541 | + title: '我已订好' + this.data.seller.name + ',点击可查看详情并导航到店', | ||
| 542 | + path: util.http_build_query(parmdata, '/pages/customer/detail_owner_invitation_new'), | ||
| 543 | + imageUrl: this.data.imgSrc || 'http://nosqn.colorcun.com/reserve/images/3x/%E6%9A%82%E6%97%A0.png', | ||
| 544 | + } | ||
| 545 | + } | ||
| 546 | + }, | ||
| 536 | // 修改detail数据 | 547 | // 修改detail数据 |
| 537 | formatDatail(detail, dateSmart) { | 548 | formatDatail(detail, dateSmart) { |
| 538 | detail.rdateStr = dateSmart; | 549 | detail.rdateStr = dateSmart; |
| @@ -607,24 +618,6 @@ Page({ | @@ -607,24 +618,6 @@ Page({ | ||
| 607 | }) | 618 | }) |
| 608 | } | 619 | } |
| 609 | } | 620 | } |
| 610 | - let obj = { | ||
| 611 | - chef, | ||
| 612 | - reserve, | ||
| 613 | - marketing, | ||
| 614 | - signboard, | ||
| 615 | - store, | ||
| 616 | - home, | ||
| 617 | - coupon, | ||
| 618 | - couponList, | ||
| 619 | - swich_phone, | ||
| 620 | - is_comments, | ||
| 621 | - StyleType, | ||
| 622 | - titleType, | ||
| 623 | - themeColor, | ||
| 624 | - } | ||
| 625 | - console.log('获取数据', { | ||
| 626 | - ...obj | ||
| 627 | - }); | ||
| 628 | // 根据券ID获取券详情 | 621 | // 根据券ID获取券详情 |
| 629 | this.getActivityByIdFun(couponList, couponList.length) | 622 | this.getActivityByIdFun(couponList, couponList.length) |
| 630 | // 根据充值ID获取充值详情 | 623 | // 根据充值ID获取充值详情 |
| @@ -644,7 +637,7 @@ Page({ | @@ -644,7 +637,7 @@ Page({ | ||
| 644 | var nightStr = lunchDis.night.split("-"); | 637 | var nightStr = lunchDis.night.split("-"); |
| 645 | var nightArr = lunchDis.night ? this.computeHour(nightStr[0], nightStr[1], 30) : []; | 638 | var nightArr = lunchDis.night ? this.computeHour(nightStr[0], nightStr[1], 30) : []; |
| 646 | timeList = solt == '1' ? morningArr : solt == '2' ? noonArr : solt == '3' ? nightArr : [] | 639 | timeList = solt == '1' ? morningArr : solt == '2' ? noonArr : solt == '3' ? nightArr : [] |
| 647 | - this.setData({ | 640 | + let obj ={ |
| 648 | chef, | 641 | chef, |
| 649 | marketing, | 642 | marketing, |
| 650 | home, | 643 | home, |
| @@ -660,6 +653,12 @@ Page({ | @@ -660,6 +653,12 @@ Page({ | ||
| 660 | timeList, | 653 | timeList, |
| 661 | isMoreBtn:marketing && marketing.is_online_book=='1' && this.data.options.onlineReserve == '1', | 654 | isMoreBtn:marketing && marketing.is_online_book=='1' && this.data.options.onlineReserve == '1', |
| 662 | isShareItem: this.data.options.isOrder != '1' && marketing && marketing.is_transpond=='1', | 655 | isShareItem: this.data.options.isOrder != '1' && marketing && marketing.is_transpond=='1', |
| 656 | + } | ||
| 657 | + console.log('获取数据GetSellerTemplateConf--------------------', { | ||
| 658 | + ...obj | ||
| 659 | + }); | ||
| 660 | + this.setData({ | ||
| 661 | + ...obj | ||
| 663 | }) | 662 | }) |
| 664 | // 开启语音播报 | 663 | // 开启语音播报 |
| 665 | if (reserve && reserve.swich_voice == '1') { | 664 | if (reserve && reserve.swich_voice == '1') { |
| @@ -303,10 +303,14 @@ | @@ -303,10 +303,14 @@ | ||
| 303 | {{toastText}} | 303 | {{toastText}} |
| 304 | </view> | 304 | </view> |
| 305 | </scroll-view> | 305 | </scroll-view> |
| 306 | -<view wx:if="{{isMoreBtn || (detail.status !='4' && isPaymenBtn) || (detail.status !='4' && isShareItem)}}" class="flex-lr sharewidth {{themeColor}}"> | ||
| 307 | - <view wx:if="{{isMoreBtn}}" class="flex-cc font30r moreBtn {{(detail.status !='4' && isPaymenBtn && isShareItem) ? 'threeBtn' : ''}}" bindtap="secondbook">再次预订</view> | ||
| 308 | - <view wx:if="{{detail.status !='4' && isPaymenBtn}}" class="flex-cc font30r paymenBtn {{(isMoreBtn && (detail.status !='4' && isShareItem)) ? 'threeBtn' : ''}}" bindtap="paymentFun">支付定金</view> | 306 | +<!-- (开启在线预订 显示在线预订) || (未开启在线预订 显示再次预订(打商家电话)) --> |
| 307 | +<!-- (未结束&&未取消 && 开启转发开关 显示 转发邀请函给客人) || (过了当前餐段结束时间||用餐完成||已取消 显示 转发店铺给好友) --> | ||
| 308 | +<view wx:if="{{isMoreBtn || options.isOrder == '1' || (!isMoreBtn && seller.phone) || (detail.status !='4' && isPaymenBtn) || (detail.status !='4' && isShareItem)}}" class="flex-lr sharewidth {{themeColor}}"> | ||
| 309 | + <view wx:if="{{isMoreBtn}}" class="flex-cc font30r moreBtn {{((detail.status !='4' && isPaymenBtn) && ((detail.status !='4' && isShareItem) || options.isOrder == '1')) ? 'threeBtn' : ''}}" bindtap="secondbook">再次预订</view> | ||
| 310 | + <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> | ||
| 311 | + <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> | ||
| 309 | <button wx:if="{{detail.status !='4' && isShareItem}}" class="flex-cc font30r shareItem" open-type="share">转发邀请函给客人</button> | 312 | <button wx:if="{{detail.status !='4' && isShareItem}}" class="flex-cc font30r shareItem" open-type="share">转发邀请函给客人</button> |
| 313 | + <button wx:if="{{options.isOrder == '1'}}" class="flex-cc font30r shareItem" data-type="2" open-type="share">转发店铺给好友</button> | ||
| 310 | </view> | 314 | </view> |
| 311 | <painter palette="{{wxml}}" style="position: absolute; top: -9999rpx;" bind:imgOK="onImgOK" /> | 315 | <painter palette="{{wxml}}" style="position: absolute; top: -9999rpx;" bind:imgOK="onImgOK" /> |
| 312 | <my-modal id="payModal" fadeStyle="slideUp" height="240px"> | 316 | <my-modal id="payModal" fadeStyle="slideUp" height="240px"> |
| @@ -328,6 +328,7 @@ Page({ | @@ -328,6 +328,7 @@ Page({ | ||
| 328 | deskStr, | 328 | deskStr, |
| 329 | dateStrDivide: dateStrDivide == '00分' ? '' : dateStrDivide, | 329 | dateStrDivide: dateStrDivide == '00分' ? '' : dateStrDivide, |
| 330 | seller_tel: reserev.seller.seller_tel, | 330 | seller_tel: reserev.seller.seller_tel, |
| 331 | + phone:reserev.phone, | ||
| 331 | } | 332 | } |
| 332 | }) | 333 | }) |
| 333 | console.log('reserev reserev', reserev); | 334 | console.log('reserev reserev', reserev); |
| @@ -534,25 +535,35 @@ Page({ | @@ -534,25 +535,35 @@ Page({ | ||
| 534 | }) | 535 | }) |
| 535 | console.log('海报生成成功', this.data.imgSrc); | 536 | console.log('海报生成成功', this.data.imgSrc); |
| 536 | }, | 537 | }, |
| 537 | - // 分享 | ||
| 538 | - sharesetting() { | 538 | + // 分享 |
| 539 | + sharesetting() { | ||
| 539 | wx.reportMonitor('1017', 1) | 540 | wx.reportMonitor('1017', 1) |
| 540 | this.closeModal() | 541 | this.closeModal() |
| 541 | - let parmdata = { | ||
| 542 | - id: this.id, | ||
| 543 | - fromid: getApp().openid, | ||
| 544 | - hasInvitation: 1, | ||
| 545 | - tplid: this.data.options.tplid | ||
| 546 | - } | ||
| 547 | - if (this.data.options.uid) { | ||
| 548 | - parmdata.uid = this.data.options.uid; | ||
| 549 | - } | ||
| 550 | - return { | ||
| 551 | - title: '我已订好' + this.data.seller.name + ',点击可查看详情并导航到店', | ||
| 552 | - path: util.http_build_query(parmdata, '/pages/customer/detail_owner_invitation_new'), | ||
| 553 | - imageUrl: this.data.imgSrc || 'http://nosqn.colorcun.com/reserve/images/3x/%E6%9A%82%E6%97%A0.png', | ||
| 554 | - } | ||
| 555 | - }, | 542 | + if(this.data.options.isOrder == '1' && this.data.detail.status !='4'){ |
| 543 | + return { | ||
| 544 | + title: '推荐' + this.data.seller.name + ',点击可查看详情并导航到店', | ||
| 545 | + path: util.http_build_query({ | ||
| 546 | + id: this.data.detail.seller.id | ||
| 547 | + }, '/pages/reserve/shopHome'), | ||
| 548 | + imageUrl: this.data.detail.seller.seller_image || 'http://nosqn.colorcun.com/reserve/images/3x/%E6%9A%82%E6%97%A0.png', | ||
| 549 | + } | ||
| 550 | + }else{ | ||
| 551 | + let parmdata = { | ||
| 552 | + id: this.id, | ||
| 553 | + fromid: getApp().openid, | ||
| 554 | + hasInvitation: 1, | ||
| 555 | + tplid: this.data.options.tplid | ||
| 556 | + } | ||
| 557 | + if (this.data.options.uid) { | ||
| 558 | + parmdata.uid = this.data.options.uid; | ||
| 559 | + } | ||
| 560 | + return { | ||
| 561 | + title: '我已订好' + this.data.seller.name + ',点击可查看详情并导航到店', | ||
| 562 | + path: util.http_build_query(parmdata, '/pages/customer/detail_owner_invitation_new'), | ||
| 563 | + imageUrl: this.data.imgSrc || 'http://nosqn.colorcun.com/reserve/images/3x/%E6%9A%82%E6%97%A0.png', | ||
| 564 | + } | ||
| 565 | + } | ||
| 566 | + }, | ||
| 556 | // 修改detail数据 | 567 | // 修改detail数据 |
| 557 | formatDatail(detail, dateSmart) { | 568 | formatDatail(detail, dateSmart) { |
| 558 | detail.rdateStr = dateSmart; | 569 | detail.rdateStr = dateSmart; |
| @@ -638,27 +649,6 @@ Page({ | @@ -638,27 +649,6 @@ Page({ | ||
| 638 | }) | 649 | }) |
| 639 | } | 650 | } |
| 640 | } | 651 | } |
| 641 | - let obj = { | ||
| 642 | - chef, | ||
| 643 | - reserve, | ||
| 644 | - marketing, | ||
| 645 | - signboard, | ||
| 646 | - store, | ||
| 647 | - home, | ||
| 648 | - coupon, | ||
| 649 | - couponList, | ||
| 650 | - swich_phone, | ||
| 651 | - is_comments, | ||
| 652 | - StyleType, | ||
| 653 | - titleType, | ||
| 654 | - themeColor, | ||
| 655 | - settingUrl, | ||
| 656 | - inviteImgUrl, | ||
| 657 | - colors, | ||
| 658 | - } | ||
| 659 | - console.log('获取数据', { | ||
| 660 | - ...obj | ||
| 661 | - }); | ||
| 662 | // 根据券ID获取券详情 | 652 | // 根据券ID获取券详情 |
| 663 | this.getActivityByIdFun(couponList, couponList.length) | 653 | this.getActivityByIdFun(couponList, couponList.length) |
| 664 | // 根据充值ID获取充值详情 | 654 | // 根据充值ID获取充值详情 |
| @@ -678,7 +668,7 @@ Page({ | @@ -678,7 +668,7 @@ Page({ | ||
| 678 | var nightStr = lunchDis.night.split("-"); | 668 | var nightStr = lunchDis.night.split("-"); |
| 679 | var nightArr = lunchDis.night ? this.computeHour(nightStr[0], nightStr[1], 30) : []; | 669 | var nightArr = lunchDis.night ? this.computeHour(nightStr[0], nightStr[1], 30) : []; |
| 680 | timeList = solt == '1' ? morningArr : solt == '2' ? noonArr : solt == '3' ? nightArr : [] | 670 | timeList = solt == '1' ? morningArr : solt == '2' ? noonArr : solt == '3' ? nightArr : [] |
| 681 | - this.setData({ | 671 | + let obj = { |
| 682 | chef, | 672 | chef, |
| 683 | marketing, | 673 | marketing, |
| 684 | home, | 674 | home, |
| @@ -697,6 +687,12 @@ Page({ | @@ -697,6 +687,12 @@ Page({ | ||
| 697 | timeList, | 687 | timeList, |
| 698 | isMoreBtn:marketing && marketing.is_online_book=='1' && this.data.options.onlineReserve == '1', | 688 | isMoreBtn:marketing && marketing.is_online_book=='1' && this.data.options.onlineReserve == '1', |
| 699 | isShareItem: this.data.options.isOrder != '1' && marketing && marketing.is_transpond=='1', | 689 | isShareItem: this.data.options.isOrder != '1' && marketing && marketing.is_transpond=='1', |
| 690 | + } | ||
| 691 | + console.log('获取数据GetSellerTemplateConf--------------------', { | ||
| 692 | + ...obj | ||
| 693 | + }); | ||
| 694 | + this.setData({ | ||
| 695 | + ...obj | ||
| 700 | }) | 696 | }) |
| 701 | // 开启语音播报 | 697 | // 开启语音播报 |
| 702 | if (reserve && reserve.swich_voice == '1') { | 698 | if (reserve && reserve.swich_voice == '1') { |
| @@ -303,10 +303,14 @@ | @@ -303,10 +303,14 @@ | ||
| 303 | {{toastText}} | 303 | {{toastText}} |
| 304 | </view> | 304 | </view> |
| 305 | </scroll-view> | 305 | </scroll-view> |
| 306 | -<view wx:if="{{isMoreBtn || (detail.status !='4' && isPaymenBtn) || (detail.status !='4' && isShareItem)}}" class="flex-lr sharewidth"> | ||
| 307 | - <view wx:if="{{isMoreBtn}}" class="flex-cc font30r moreBtn {{(detail.status !='4' && isPaymenBtn && isShareItem) ? 'threeBtn' : ''}}" bindtap="secondbook">再次预订</view> | ||
| 308 | - <view wx:if="{{detail.status !='4' && isPaymenBtn}}" class="flex-cc font30r paymenBtn {{(isMoreBtn && (detail.status !='4' && isShareItem)) ? 'threeBtn' : ''}}" bindtap="paymentFun">支付定金</view> | ||
| 309 | - <button wx:if="{{detail.status !='4' && isShareItem}}" class="flex-cc font30r shareItem" open-type="share">转发邀请函给客人</button> | 306 | +<!-- (开启在线预订 显示在线预订) || (未开启在线预订 显示再次预订(打商家电话)) --> |
| 307 | +<!-- (未结束&&未取消 && 开启转发开关 显示 转发邀请函给客人) || (过了当前餐段结束时间||用餐完成||已取消 显示 转发店铺给好友) --> | ||
| 308 | +<view wx:if="{{isMoreBtn || options.isOrder == '1' || (!isMoreBtn && seller.phone) || (detail.status !='4' && isPaymenBtn) || (detail.status !='4' && isShareItem)}}" class="flex-lr sharewidth"> | ||
| 309 | + <view wx:if="{{isMoreBtn}}" class="flex-cc font30r moreBtn {{((detail.status !='4' && isPaymenBtn) && ((detail.status !='4' && isShareItem) || options.isOrder == '1')) ? 'threeBtn' : ''}}" bindtap="secondbook">再次预订</view> | ||
| 310 | + <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> | ||
| 311 | + <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> | ||
| 312 | + <button wx:if="{{detail.status !='4' && isShareItem}}" class="flex-cc font30r shareItem" open-type="share">转发邀请函给客人</button> | ||
| 313 | + <button wx:if="{{options.isOrder == '1'}}" class="flex-cc font30r shareItem" data-type="2" open-type="share">转发店铺给好友</button> | ||
| 310 | </view> | 314 | </view> |
| 311 | <painter palette="{{wxml}}" style="position: absolute; top: -9999rpx;" bind:imgOK="onImgOK" /> | 315 | <painter palette="{{wxml}}" style="position: absolute; top: -9999rpx;" bind:imgOK="onImgOK" /> |
| 312 | <my-modal id="payModal" fadeStyle="slideUp" height="240px"> | 316 | <my-modal id="payModal" fadeStyle="slideUp" height="240px"> |
-
Please register or login to post a comment