|
@@ -131,10 +131,14 @@ Page({ |
|
@@ -131,10 +131,14 @@ Page({ |
|
131
|
if(res.data.hasSetUserInfo){
|
131
|
if(res.data.hasSetUserInfo){
|
|
132
|
App.Customer.GetCustomerInfo({},'clear')
|
132
|
App.Customer.GetCustomerInfo({},'clear')
|
|
133
|
}
|
133
|
}
|
|
|
|
134
|
+ let firstShowMsg='预计10分钟左右餐厅将告知您结果(请留意短息或微信通知)'
|
|
|
|
135
|
+ if(!this.hasInWorkTime()){//非营业时间预订
|
|
|
|
136
|
+ firstShowMsg='商家未营业,营业后将第一时间告知您预订结果'
|
|
|
|
137
|
+ }
|
|
134
|
wx.redirectTo({
|
138
|
wx.redirectTo({
|
|
135
|
url:util.http_build_query({
|
139
|
url:util.http_build_query({
|
|
136
|
id:res.data.rid,
|
140
|
id:res.data.rid,
|
|
137
|
- hasFirstShow:1,
|
141
|
+ firstShowMsg:firstShowMsg,
|
|
138
|
},'/pages/customer/detail_owner')
|
142
|
},'/pages/customer/detail_owner')
|
|
139
|
})
|
143
|
})
|
|
140
|
})
|
144
|
})
|
|
@@ -164,4 +168,22 @@ Page({ |
|
@@ -164,4 +168,22 @@ Page({ |
|
164
|
user: this.user
|
168
|
user: this.user
|
|
165
|
})
|
169
|
})
|
|
166
|
},
|
170
|
},
|
|
|
|
171
|
+ hasInWorkTime(){
|
|
|
|
172
|
+ let daily=this.data.seller.daily;
|
|
|
|
173
|
+ let wt=['morning','noon','night'];
|
|
|
|
174
|
+ let stime='',etime='',time=parseInt(new Date()/1000)
|
|
|
|
175
|
+ let today=util.unixtoTime(time,"YYYY-MM-DD")
|
|
|
|
176
|
+ wt.forEach(k=>{
|
|
|
|
177
|
+ if(!daily[k])return;
|
|
|
|
178
|
+ let xt=daily[k].split('-');
|
|
|
|
179
|
+ if(!stime){
|
|
|
|
180
|
+ stime=util.timetouUnix(today+' '+xt[0]+':00')
|
|
|
|
181
|
+ }
|
|
|
|
182
|
+ etime=util.timetouUnix(today+' '+xt[1]+':00')
|
|
|
|
183
|
+ })
|
|
|
|
184
|
+ if(time>=stime && time<=etime){
|
|
|
|
185
|
+ return true;
|
|
|
|
186
|
+ }
|
|
|
|
187
|
+ return false;
|
|
|
|
188
|
+ },
|
|
167
|
}) |
189
|
}) |