Commit 451599d04bb82f9e56c3c81b6175491b3de29a88

Authored by vking
1 parent ed61c79d

包厢预订通知 状态、预订门店、包厢名称、备注

... ... @@ -19,11 +19,15 @@ Page({
},
id: null,
tpls: TP.tpls(),
hasGetSellerDetail:false,
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.id = options.id;
if(!options.firstShowMsg){
this.hasGetSellerDetail=true
}
this.setData({
firstShowMsg:options.firstShowMsg,
})
... ... @@ -68,13 +72,39 @@ Page({
App.Reserve.Detail({
openid: getApp().openid,
rid: this.id
}).then(res => {
}).then(async res => {
this.detail=this.formatDatail(res.data)
this.detail.ddate_solt=Number(this.detail.ddate_solt);
this.setData({
detail: this.detail,
hasOnlineReserve:res.data.type==1,
})
if(this.hasGetSellerDetail){
let sellerRes=await App.Customer.GetSellerDetail({sid:this.detail.sid})
let seller=sellerRes.data
let flag=false,stime='',etime='',time=parseInt(new Date()/1000)
let today=util.unixtoTime(time,"YYYY-MM-DD")
stime=util.timetouUnix(today+' '+seller.rec_stime+':00')
etime=util.timetouUnix(today+' '+seller.rec_etime+':00')
if(etime<=stime){
if(time<=etime){
flag=true
}
etime+=86400
}
if(!flag){
if(time>=stime && time<=etime){
flag=true;
}
}
let firstShowMsg='预计10分钟左右餐厅将告知您结果(请留意短息或微信通知)'
if(!flag){
firstShowMsg=seller.rec_stime
}
this.setData({
firstShowMsg:firstShowMsg,
})
}
})
},
formatDatail(detail) {
... ...
... ... @@ -483,7 +483,7 @@
"id": 57,
"name": "pages/customer/detail_owner",
"pathName": "pages/customer/detail_owner",
"query": "id=33347&firstShowMsg=1111",
"query": "id=56282&firstShowMsg=",
"scene": null
},
{
... ...