Commit 660fdc2681566777ab1120fcaa3a62b871eda4ec

Authored by vking
1 parent cacaa466

online

... ... @@ -14,7 +14,7 @@ Page({
data: {
detail: null,
hasOnlineReserve: false,
hasFirstShow:0,
firstShowMsg:'',
},
id: null,
tpls: TP.tpls(),
... ... @@ -24,7 +24,7 @@ Page({
onLoad: function (options) {
this.id = options.id;
this.setData({
hasFirstShow:options.hasFirstShow||0,
firstShowMsg:options.firstShowMsg,
})
},
... ...
... ... @@ -20,7 +20,7 @@
<icon type="waiting" size="47" color="#C8B16D"/>
</view>
<view class="title Medium">餐厅处理中</view>
<view class="info" wx:if="{{hasFirstShow}}">预计10分钟左右餐厅将告知您结果(请留意短息或微信通知)</view>
<view class="info" wx:if="{{firstShowMsg}}">{{firstShowMsg}}</view>
</block>
<block wx:elif="{{detail.status==6}}">
<view class="icon">
... ...
... ... @@ -131,10 +131,14 @@ Page({
if(res.data.hasSetUserInfo){
App.Customer.GetCustomerInfo({},'clear')
}
let firstShowMsg='预计10分钟左右餐厅将告知您结果(请留意短息或微信通知)'
if(!this.hasInWorkTime()){//非营业时间预订
firstShowMsg='商家未营业,营业后将第一时间告知您预订结果'
}
wx.redirectTo({
url:util.http_build_query({
id:res.data.rid,
hasFirstShow:1,
firstShowMsg:firstShowMsg,
},'/pages/customer/detail_owner')
})
})
... ... @@ -164,4 +168,22 @@ Page({
user: this.user
})
},
hasInWorkTime(){
let daily=this.data.seller.daily;
let wt=['morning','noon','night'];
let stime='',etime='',time=parseInt(new Date()/1000)
let today=util.unixtoTime(time,"YYYY-MM-DD")
wt.forEach(k=>{
if(!daily[k])return;
let xt=daily[k].split('-');
if(!stime){
stime=util.timetouUnix(today+' '+xt[0]+':00')
}
etime=util.timetouUnix(today+' '+xt[1]+':00')
})
if(time>=stime && time<=etime){
return true;
}
return false;
},
})
\ No newline at end of file
... ...
... ... @@ -34,7 +34,7 @@
font-weight: bold;
}
.item view:last-child{
font-size: 34rpx;
font-size: 28rpx;
}
.switch{
width: 252rpx;
... ...