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({ @@ -155,9 +155,9 @@ Page({
155 if(res.data.hasSetUserInfo){ 155 if(res.data.hasSetUserInfo){
156 App.Customer.GetCustomerInfo({},'clear') 156 App.Customer.GetCustomerInfo({},'clear')
157 } 157 }
158 - let firstShowMsg='餐厅一般会在10分钟内为您反馈结果,请耐心等候(请留意短信或微信通知)' 158 + let firstShowMsg='餐厅一般会在10分钟内为您反馈结果,请留意短信或微信通知'
159 if(!this.hasInWorkTime()){//非营业时间预订 159 if(!this.hasInWorkTime()){//非营业时间预订
160 - firstShowMsg='商家未营业,营业后将第一时间告知您预订结果' 160 + firstShowMsg='商家未上班,上班后将第一时间告知您预订结果,请留意短信/微信通知(上班时间:'+this.data.seller.rec_stime+'—'+this.data.seller.rec_etime+')'
161 } 161 }
162 wx.redirectTo({ 162 wx.redirectTo({
163 url:util.http_build_query({ 163 url:util.http_build_query({
@@ -193,18 +193,10 @@ Page({ @@ -193,18 +193,10 @@ Page({
193 }) 193 })
194 }, 194 },
195 hasInWorkTime(){ 195 hasInWorkTime(){
196 - let daily=this.data.seller.daily;  
197 - let wt=['morning','noon','night'];  
198 let stime='',etime='',time=parseInt(new Date()/1000) 196 let stime='',etime='',time=parseInt(new Date()/1000)
199 let today=util.unixtoTime(time,"YYYY-MM-DD") 197 let today=util.unixtoTime(time,"YYYY-MM-DD")
200 - wt.forEach(k=>{  
201 - if(!daily[k])return;  
202 - let xt=daily[k].split('-');  
203 - if(!stime){  
204 - stime=util.timetouUnix(today+' '+xt[0]+':00')  
205 - }  
206 - etime=util.timetouUnix(today+' '+xt[1]+':00')  
207 - }) 198 + stime=util.timetouUnix(today+' '+this.data.seller.rec_stime+':00')
  199 + etime=util.timetouUnix(today+' '+this.data.seller.rec_etime+':00')
208 if(time>=stime && time<=etime){ 200 if(time>=stime && time<=etime){
209 return true; 201 return true;
210 } 202 }