|
...
|
...
|
@@ -25,22 +25,22 @@ Page({ |
|
|
|
*/
|
|
|
|
options:null,
|
|
|
|
onLoad: function (options) {
|
|
|
|
console.log(options)
|
|
|
|
console.log(options)
|
|
|
|
options.room_demand=JSON.parse(decodeURIComponent(options.room_demand))
|
|
|
|
this.options=options
|
|
|
|
this.GetSellerDetail();
|
|
|
|
App.Customer.GetCustomerInfo().then(res=>{
|
|
|
|
if(res.data.length>0){
|
|
|
|
res.data.forEach((v,i)=>{
|
|
|
|
if(v.is_default==1){
|
|
|
|
this.user = v
|
|
|
|
v.remark='';
|
|
|
|
this.setData({
|
|
|
|
user: v,
|
|
|
|
})
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
})
|
|
|
|
res.data.forEach((v,i)=>{
|
|
|
|
if(v.is_default==1){
|
|
|
|
this.user = v
|
|
|
|
v.remark=wx.getStorageSync('remark') ? wx.getStorageSync('remark') : '';
|
|
|
|
this.setData({
|
|
|
|
user: v,
|
|
|
|
})
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
})
|
|
|
|
}
|
|
|
|
})
|
|
|
|
},
|
|
...
|
...
|
@@ -56,7 +56,9 @@ Page({ |
|
|
|
* 生命周期函数--监听页面显示
|
|
|
|
*/
|
|
|
|
onShow: function () {
|
|
|
|
|
|
|
|
this.setData({
|
|
|
|
'user.remark':wx.getStorageSync('remark') ? wx.getStorageSync('remark') : ''
|
|
|
|
})
|
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
...
|
...
|
@@ -139,7 +141,7 @@ Page({ |
|
|
|
this.options.room_demand.forEach((v,i)=>{
|
|
|
|
roomids.push(v.id)
|
|
|
|
})
|
|
|
|
console.log('ceshi',roomids);
|
|
|
|
console.log('ceshi',roomids);
|
|
|
|
App.Customer.SetReserveInfo({
|
|
|
|
sid:this.options.sid,
|
|
|
|
ddate:this.options.ddate,
|
|
...
|
...
|
@@ -159,10 +161,14 @@ Page({ |
|
|
|
if(res.data.hasSetUserInfo){
|
|
|
|
App.Customer.GetCustomerInfo({},'clear')
|
|
|
|
}
|
|
|
|
if(this.data.user.remark!=''){
|
|
|
|
this.setremark();
|
|
|
|
}
|
|
|
|
let firstShowMsg='餐厅一般会在10分钟内为您反馈结果,请留意短信或微信通知'
|
|
|
|
if(!this.hasInWorkTime()){//非营业时间预订
|
|
|
|
firstShowMsg='商家未上班,上班后将第一时间告知您预订结果,请留意短信/微信通知(上班时间:'+this.data.seller.rec_stime+'—'+this.data.seller.rec_etime+')'
|
|
|
|
}
|
|
|
|
wx.removeStorageSync('remark')
|
|
|
|
wx.redirectTo({
|
|
|
|
url:util.http_build_query({
|
|
|
|
id:res.data.rid,
|
|
...
|
...
|
@@ -242,4 +248,18 @@ Page({ |
|
|
|
})
|
|
|
|
}).exec()
|
|
|
|
},
|
|
|
|
toremark(){
|
|
|
|
wx.navigateTo({
|
|
|
|
url:'remark?remark='+this.data.user.remark,
|
|
|
|
})
|
|
|
|
},
|
|
|
|
setremark(){
|
|
|
|
App.Customer.SetUserRemarkes({remark:this.data.user.remark}).then((json)=>{
|
|
|
|
console.log(json)
|
|
|
|
if(json.ret==200){
|
|
|
|
console.log(json)
|
|
|
|
App.Customer.GetUserRemarkes({},'clear')
|
|
|
|
}
|
|
|
|
})
|
|
|
|
},
|
|
|
|
}) |
|
|
\ No newline at end of file |
...
|
...
|
|