Commit fa56b4ccdf2f6f9ab9be0d2a322eacd1d26637b6

Authored by vking
1 parent d73556c9

【一键订C端:在线预订提交成功后,处理订单提示信息未按照接单时间提示】https://www.tapd.cn/57419716/bugtrace/bugs/vi…

…ew?bug_id=1157419716001002772
Showing 1 changed file with 4 additions and 12 deletions
... ... @@ -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;
}
... ...