Commit fc3f924d9c8616740cf56b4abcb3abbe420d367d

Authored by pengye
1 parent 379e90f4

订单列表、邀请函、商家详情判断是否开启在线预订,未开启不显示再次预订按钮

... ... @@ -51,8 +51,10 @@
<view style="height: 30rpx;"></view>
</view>
<view class="view button-cover flex-rr">
<navigator url="/pages/reserve/reserve?id={{reserve.seller.id}}&activeTab=reserve" class="second-book-button flex-cc item-button">再次预订</navigator>
<view class="remark-button flex-cc item-button" wx:if="{{tabType==6 && hasComment}}" catchtap="remark">评价</view>
<block wx:if="{{reserve.seller.is_online_reserve == '1'}}">
<navigator url="/pages/reserve/reserve?id={{reserve.seller.id}}&activeTab=reserve" class="second-book-button flex-cc item-button">再次预订</navigator>
</block>
<view class="remark-button flex-cc item-button" wx:if="{{tabType==6 && hasComment}}" catchtap="remark">评价</view>
<block wx:if="{{tabType==5}}">
<userinfo
binduserinfo="checkout"
... ...
... ... @@ -28,11 +28,13 @@
<service id="service" class="split view">
<view class="min-but flex align-center justify-center txt-30-h solid">联系客服</view>
</service>
<navigator url="/pages/reserve/reserve?id={{detail.sid}}&activeTab=reserve"
wx:if="{{detail.hasCancel || detail.status==6}}"
class="split">
<view class="min-but flex align-center justify-center txt-30-h solid">再次预订</view>
</navigator>
<block wx:if="{{detail.seller.is_online_reserve == '1'}}">
<navigator url="/pages/reserve/reserve?id={{detail.sid}}&activeTab=reserve"
wx:if="{{detail.hasCancel || detail.status==6}}"
class="split">
<view class="min-but flex align-center justify-center txt-30-h solid">再次预订</view>
</navigator>
</block>
<block wx:if="{{customerCancel && customerCancel == '1'}}">
<navigator url="./cancel?id={{detail.id}}"
wx:if="{{(detail.hasRunning || detail.status==0) && checkout.status!=3}}"
... ...
... ... @@ -235,8 +235,8 @@
{{toastText}}
</view>
</scroll-view>
<view wx:if="{{marketing.is_transpond=='1' || marketing.is_online_book=='1' || (paymentId && paymentStatus == '0')}}" class="flex-lr sharewidth {{themeColor}}">
<view wx:if="{{marketing.is_online_book=='1'}}" class="flex-cc font30r moreBtn" bindtap="secondbook" style="position: relative;">再次预订</view>
<view wx:if="{{marketing.is_transpond=='1' || (marketing.is_online_book=='1' && options.onlineReserve == '1') || (paymentId && paymentStatus == '0')}}" class="flex-lr sharewidth {{themeColor}}">
<view wx:if="{{marketing.is_online_book=='1' && options.onlineReserve == '1'}}" class="flex-cc font30r moreBtn" bindtap="secondbook" style="position: relative;">再次预订</view>
<view wx:if="{{detail.status !='4' && options.isOrder != '1' && paymentId && paymentStatus == '0'}}" class="flex-cc font30r paymenBtn" bindtap="paymentFun">支付定金</view>
<button wx:if="{{detail.status !='4' && options.isOrder != '1' && marketing.is_transpond=='1' && imgSrc}}" class="flex-cc font30r shareItem" open-type="share">转发给客人</button>
</view>
... ...
... ... @@ -237,8 +237,8 @@
{{toastText}}
</view>
</scroll-view>
<view wx:if="{{marketing.is_transpond=='1' || marketing.is_online_book=='1' || (paymentId && paymentStatus == '0')}}" class="flex-lr sharewidth {{themeColor}}">
<view wx:if="{{marketing.is_online_book=='1'}}" class="flex-cc font30r moreBtn" bindtap="secondbook" style="position: relative;">再次预订</view>
<view wx:if="{{marketing.is_transpond=='1' || (marketing.is_online_book=='1' && options.onlineReserve == '1') || (paymentId && paymentStatus == '0')}}" class="flex-lr sharewidth {{themeColor}}">
<view wx:if="{{marketing.is_online_book=='1' && options.onlineReserve == '1'}}" class="flex-cc font30r moreBtn" bindtap="secondbook" style="position: relative;">再次预订</view>
<view wx:if="{{detail.status !='4' && options.isOrder != '1' && paymentId && paymentStatus == '0'}}" class="flex-cc font30r paymenBtn" bindtap="paymentFun">支付定金</view>
<button wx:if="{{detail.status !='4' && options.isOrder != '1' && marketing.is_transpond=='1' && imgSrc}}" class="flex-cc font30r shareItem" open-type="share">转发给客人</button>
</view>
... ...
... ... @@ -220,8 +220,8 @@
{{toastText}}
</view>
</scroll-view>
<view wx:if="{{marketing.is_transpond=='1' || marketing.is_online_book=='1' || (paymentId && paymentStatus == '0')}}" class="flex-lr sharewidth {{themeColor}}">
<view wx:if="{{marketing.is_online_book=='1'}}" class="flex-cc font30r moreBtn" bindtap="secondbook" style="position: relative;">再次预订</view>
<view wx:if="{{marketing.is_transpond=='1' || marketing.is_online_book=='1' && options.onlineReserve == '1' || (paymentId && paymentStatus == '0')}}" class="flex-lr sharewidth {{themeColor}}">
<view wx:if="{{marketing.is_online_book=='1' && options.onlineReserve == '1'}}" class="flex-cc font30r moreBtn" bindtap="secondbook" style="position: relative;">再次预订</view>
<view wx:if="{{detail.status !='4' && options.isOrder != '1' && paymentId && paymentStatus == '0'}}" class="flex-cc font30r paymenBtn" bindtap="paymentFun">支付定金</view>
<button wx:if="{{detail.status !='4' && options.isOrder != '1' && marketing.is_transpond=='1' && imgSrc}}" class="flex-cc font30r shareItem" open-type="share">转发给客人</button>
</view>
... ...
... ... @@ -218,8 +218,8 @@
{{toastText}}
</view>
</scroll-view>
<view wx:if="{{marketing.is_transpond=='1' || marketing.is_online_book=='1' || (paymentId && paymentStatus == '0')}}" class="flex-lr sharewidth {{themeColor}}">
<view wx:if="{{marketing.is_online_book=='1'}}" class="flex-cc font30r moreBtn" bindtap="secondbook" style="position: relative;">再次预订</view>
<view wx:if="{{marketing.is_transpond=='1' || (marketing.is_online_book=='1' && options.onlineReserve == '1') || (paymentId && paymentStatus == '0')}}" class="flex-lr sharewidth {{themeColor}}">
<view wx:if="{{marketing.is_online_book=='1' && options.onlineReserve == '1'}}" class="flex-cc font30r moreBtn" bindtap="secondbook" style="position: relative;">再次预订</view>
<view wx:if="{{detail.status !='4' && options.isOrder != '1' && paymentId && paymentStatus == '0'}}" class="flex-cc font30r paymenBtn" bindtap="paymentFun">支付定金</view>
<button wx:if="{{detail.status !='4' && options.isOrder != '1' && marketing.is_transpond=='1' && imgSrc}}" class="flex-cc font30r shareItem" open-type="share">转发给客人</button>
</view>
... ...
... ... @@ -279,8 +279,8 @@
{{toastText}}
</view>
</scroll-view>
<view wx:if="{{marketing.is_transpond=='1' || marketing.is_online_book=='1' || (paymentId && paymentStatus == '0')}}" class="all-button flex-lr sharewidth">
<view wx:if="{{marketing.is_online_book=='1'}}" class="flex-cc font30r moreBtn" bindtap="secondbook" style="position: relative;">再次预订</view>
<view wx:if="{{marketing.is_transpond=='1' || (marketing.is_online_book=='1' && options.onlineReserve == '1') || (paymentId && paymentStatus == '0')}}" class="all-button flex-lr sharewidth">
<view wx:if="{{marketing.is_online_book=='1' && options.onlineReserve == '1'}}" class="flex-cc font30r moreBtn" bindtap="secondbook" style="position: relative;">再次预订</view>
<view wx:if="{{detail.status !='4' && options.isOrder != '1' && paymentId && paymentStatus == '0'}}" class="flex-cc font30r paymenBtn" bindtap="paymentFun">支付定金</view>
<button wx:if="{{detail.status !='4' && options.isOrder != '1' && marketing.is_transpond=='1' && imgSrc}}" class="flex-cc font30r shareItem" open-type="share">转发给客人</button>
</view>
... ...
... ... @@ -233,8 +233,8 @@
{{toastText}}
</view>
</scroll-view>
<view wx:if="{{marketing.is_transpond=='1' || marketing.is_online_book=='1' || (paymentId && paymentStatus == '0')}}" class="flex-lr sharewidth {{themeColor}}">
<view wx:if="{{marketing.is_online_book=='1'}}" class="flex-cc font30r moreBtn" bindtap="secondbook" style="position: relative;">再次预订</view>
<view wx:if="{{marketing.is_transpond=='1' || (marketing.is_online_book=='1' && options.onlineReserve == '1') || (paymentId && paymentStatus == '0')}}" class="flex-lr sharewidth {{themeColor}}">
<view wx:if="{{marketing.is_online_book=='1' && options.onlineReserve == '1'}}" class="flex-cc font30r moreBtn" bindtap="secondbook" style="position: relative;">再次预订</view>
<view wx:if="{{detail.status !='4' && options.isOrder != '1' && paymentId && paymentStatus == '0'}}" class="flex-cc font30r paymenBtn" bindtap="paymentFun">支付定金</view>
<button wx:if="{{detail.status !='4' && options.isOrder != '1' && marketing.is_transpond=='1' && imgSrc}}" class="flex-cc font30r shareItem" open-type="share">转发给客人</button>
</view>
... ...
... ... @@ -230,8 +230,8 @@
{{toastText}}
</view>
</scroll-view>
<view wx:if="{{marketing.is_transpond=='1' || marketing.is_online_book=='1' || (paymentId && paymentStatus == '0')}}" class="flex-lr sharewidth {{themeColor}}">
<view wx:if="{{marketing.is_online_book=='1'}}" class="flex-cc font30r moreBtn" bindtap="secondbook" style="position: relative;">再次预订</view>
<view wx:if="{{marketing.is_transpond=='1' || (marketing.is_online_book=='1' && options.onlineReserve == '1') || (paymentId && paymentStatus == '0')}}" class="flex-lr sharewidth {{themeColor}}">
<view wx:if="{{marketing.is_online_book=='1' && options.onlineReserve == '1'}}" class="flex-cc font30r moreBtn" bindtap="secondbook" style="position: relative;">再次预订</view>
<view wx:if="{{detail.status !='4' && options.isOrder != '1' && paymentId && paymentStatus == '0'}}" class="flex-cc font30r paymenBtn" bindtap="paymentFun">支付定金</view>
<button wx:if="{{detail.status !='4' && options.isOrder != '1' && marketing.is_transpond=='1' && imgSrc}}" class="flex-cc font30r shareItem" open-type="share">转发给客人</button>
</view>
... ...
... ... @@ -236,8 +236,8 @@
{{toastText}}
</view>
</scroll-view>
<view wx:if="{{marketing.is_transpond=='1' || marketing.is_online_book=='1' || (paymentId && paymentStatus == '0')}}" class="flex-lr sharewidth">
<view wx:if="{{marketing.is_online_book=='1'}}" class="flex-cc font30r moreBtn" bindtap="secondbook" style="position: relative;">再次预订</view>
<view wx:if="{{marketing.is_transpond=='1' || (marketing.is_online_book=='1' && options.onlineReserve == '1') || (paymentId && paymentStatus == '0')}}" class="flex-lr sharewidth">
<view wx:if="{{marketing.is_online_book=='1' && options.onlineReserve == '1'}}" class="flex-cc font30r moreBtn" bindtap="secondbook" style="position: relative;">再次预订</view>
<view wx:if="{{detail.status !='4' && options.isOrder != '1' && paymentId && paymentStatus == '0'}}" class="flex-cc font30r paymenBtn" bindtap="paymentFun">支付定金</view>
<button wx:if="{{detail.status !='4' && options.isOrder != '1' && marketing.is_transpond=='1' && imgSrc}}" class="flex-cc font30r shareItem" open-type="share">转发给客人</button>
</view>
... ...
... ... @@ -92,11 +92,23 @@ Page({
const month = date.getMonth() + 1;
const day = date.getDate();
let isOrder = this.isCurrentTimeGreaterThan(year, month, day, timeHour * 1, timeMinute * 1)
this.getSellerTemplateConfFun(RS.reserve(res.data).sid, isOrder, reserev.status);
this.getSellerDetail(RS.reserve(res.data).sid, isOrder, reserev.status)
}).catch(res => {
console.log(res, '详情请求失败');
})
},
// 获取店铺详情
getSellerDetail(sid, isOrder, status) {
App.Customer.GetSellerDetail({
openid: getApp().openid,
sid
}).then(res => {
let is_online_reserve = res.data.is_online_reserve;
this.getSellerTemplateConfFun(RS.reserve(res.data).sid, isOrder, status,is_online_reserve);
}).catch(res => {
console.log(res, '商家详情请求失败');
})
},
// 判断是否超过该预订的餐段截止时间 为1 代表超过了
isCurrentTimeGreaterThan(year, month, day, hour, minute) {
const currentTime = new Date();
... ... @@ -105,7 +117,7 @@ Page({
return isorder;
},
// 获取商家设置营销信息
getSellerTemplateConfFun(sid, isOrder, status) {
getSellerTemplateConfFun(sid, isOrder, status, is_online_reserve) {
App.Seller.GetSellerTemplateConf({
sid
}).then(res => {
... ... @@ -118,7 +130,7 @@ Page({
} else {
url = '/pages/customer/detail_owner_invitation9';
}
url += '?id=' + this.data.options.id + '&tplid=' + this.data.options.tplid;
url += '?id=' + this.data.options.id + '&tplid=' + this.data.options.tplid + '&onlineReserve=' + is_online_reserve;
// (过了当前餐段结束时间 || 预订是用餐完成状态) 邀请函显示已结束
url += (isOrder == '1' || status == '3') ? '&isOrder=1' : '';
url+= this.data.options.paymentId?'&paymentId='+this.data.options.paymentId:'&paymentId=' ;
... ...
... ... @@ -76,6 +76,7 @@ Page({
address: reserev.map_address,
lat: reserev.lat,
long: reserev.long,
is_online_reserve: reserev.is_online_reserve,
}
})
console.log('sellerseller', {
... ...
... ... @@ -129,7 +129,9 @@
</text>
</view>
<view class="all-button flex-lr between">
<navigator url="/pages/reserve/reserve?id={{sid}}&activeTab=reserve" class="book-item-font second-book-button flex-cc font30r" style="position: relative;">预订包间</navigator>
<block wx:if="{{seller.is_online_reserve == '1'}}">
<navigator url="/pages/reserve/reserve?id={{sid}}&activeTab=reserve" class="book-item-font second-book-button flex-cc font30r" style="position: relative;">预订包间</navigator>
</block>
<button class="book-item-font flex-cc font30r shareItem" open-type="share">转发给朋友
</button>
</view>
... ...