|
...
|
...
|
@@ -155,9 +155,9 @@ Page({ |
|
|
|
if(res.data.hasSetUserInfo){
|
|
|
|
App.Customer.GetCustomerInfo({},'clear')
|
|
|
|
}
|
|
|
|
let firstShowMsg='餐厅一般会在10分钟内为您反馈结果,请耐心等候(请留意短信或微信通知)'
|
|
|
|
let firstShowMsg='餐厅一般会在10分钟内为您反馈结果,请留意短信或微信通知'
|
|
|
|
if(!this.hasInWorkTime()){//非营业时间预订
|
|
|
|
firstShowMsg='商家未营业,营业后将第一时间告知您预订结果'
|
|
|
|
firstShowMsg='商家未上班,上班后将第一时间告知您预订结果,请留意短信/微信通知(上班时间:'+this.data.seller.rec_stime+'—'+this.data.seller.rec_etime+')'
|
|
|
|
}
|
|
|
|
wx.redirectTo({
|
|
|
|
url:util.http_build_query({
|
|
...
|
...
|
@@ -193,18 +193,10 @@ Page({ |
|
|
|
})
|
|
|
|
},
|
|
|
|
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')
|
|
|
|
})
|
|
|
|
stime=util.timetouUnix(today+' '+this.data.seller.rec_stime+':00')
|
|
|
|
etime=util.timetouUnix(today+' '+this.data.seller.rec_etime+':00')
|
|
|
|
if(time>=stime && time<=etime){
|
|
|
|
return true;
|
|
|
|
}
|
...
|
...
|
|