|
...
|
...
|
@@ -33,14 +33,14 @@ Page({ |
|
|
|
* 生命周期函数--监听页面初次渲染完成
|
|
|
|
*/
|
|
|
|
onReady: function () {
|
|
|
|
|
|
|
|
this.selectComponent('#getpos').getPos();
|
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 生命周期函数--监听页面显示
|
|
|
|
*/
|
|
|
|
onShow: function () {
|
|
|
|
this.selectComponent('#getpos').getPos();
|
|
|
|
this.getDetail()
|
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
...
|
...
|
@@ -64,6 +64,19 @@ Page({ |
|
|
|
console.log('onShareAppMessage', arguments)
|
|
|
|
return this.shareSetting(e);
|
|
|
|
},
|
|
|
|
getDetail(){
|
|
|
|
App.Reserve.Detail({
|
|
|
|
openid: getApp().openid,
|
|
|
|
rid: this.id
|
|
|
|
}).then(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,
|
|
|
|
})
|
|
|
|
})
|
|
|
|
},
|
|
|
|
formatDatail(detail) {
|
|
|
|
detail.rdateStr = util.unixtoTime(detail.ddate, 'MM月DD日 WW HH:II');
|
|
|
|
detail=RS.reserve(detail);
|
|
...
|
...
|
@@ -212,20 +225,14 @@ Page({ |
|
|
|
onpos(e){
|
|
|
|
console.log('onpos',e);
|
|
|
|
this.location=e.detail
|
|
|
|
App.Reserve.Detail({
|
|
|
|
openid: getApp().openid,
|
|
|
|
rid: this.id
|
|
|
|
}).then(res => {
|
|
|
|
let detail=this.formatDatail(res.data)
|
|
|
|
detail.ddate_solt=Number(detail.ddate_solt);
|
|
|
|
this.setData({
|
|
|
|
detail: detail,
|
|
|
|
hasOnlineReserve:res.data.type==1,
|
|
|
|
})
|
|
|
|
if(detail.type==1 && detail.status==6){
|
|
|
|
this.GetRecommendSellerList(detail.seller.id)
|
|
|
|
}
|
|
|
|
})
|
|
|
|
if(!this.detail){
|
|
|
|
return setTimeout(()=>{
|
|
|
|
this.onpos(e)
|
|
|
|
},500)
|
|
|
|
}
|
|
|
|
if(this.detail.type==1 && this.detail.status==6){
|
|
|
|
this.GetRecommendSellerList(this.detail.seller.id)
|
|
|
|
}
|
|
|
|
},
|
|
|
|
gotoSellerDetail(e){
|
|
|
|
console.log(e)
|
...
|
...
|
|