|
...
|
...
|
@@ -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 |
...
|
...
|
|