|
...
|
...
|
@@ -58,7 +58,9 @@ Page({ |
|
|
|
/**
|
|
|
|
* 生命周期函数--监听页面初次渲染完成
|
|
|
|
*/
|
|
|
|
onReady() {},
|
|
|
|
onReady() {
|
|
|
|
this.getDetail();
|
|
|
|
},
|
|
|
|
/**
|
|
|
|
* 用户点击右上角分享
|
|
|
|
*/
|
|
...
|
...
|
@@ -72,7 +74,6 @@ Page({ |
|
|
|
* 生命周期函数--监听页面显示
|
|
|
|
*/
|
|
|
|
onShow: function () {
|
|
|
|
this.getDetail();
|
|
|
|
},
|
|
|
|
cli() {
|
|
|
|
wx.setClipboardData({
|
|
...
|
...
|
@@ -155,7 +156,9 @@ Page({ |
|
|
|
console.log(reserev,'reserevreserevreserevreserevreserev');
|
|
|
|
console.log(this.data.seller,'sellersellersellerseller');
|
|
|
|
console.log(this.data.detail,'detaildetaildetaildetail');
|
|
|
|
this.getSellerTemplateConf(reserev.sid);
|
|
|
|
this.getSellerTemplateConfFun(reserev.sid);
|
|
|
|
}).catch(res=>{
|
|
|
|
console.log(res,'详情请求失败');
|
|
|
|
})
|
|
|
|
},
|
|
|
|
cookbook() {
|
|
...
|
...
|
@@ -200,15 +203,16 @@ Page({ |
|
|
|
id: this.id,
|
|
|
|
fromid: getApp().openid,
|
|
|
|
hasInvitation: 1,
|
|
|
|
tplid: this.data.options.tplid,
|
|
|
|
tplid: this.data.options.tplid
|
|
|
|
}
|
|
|
|
if (this.data.options.uid) {
|
|
|
|
parmdata.uid = this.data.options.uid;
|
|
|
|
}
|
|
|
|
console.log('seller_imageseller_imageseller_imageseller_imageseller_image',this.data.detail.seller.seller_image);
|
|
|
|
return {
|
|
|
|
title: this.data.tpls[0].shareTitle,
|
|
|
|
title: '邀请您于'+this.data.seller.date+'一起共进'+this.data.seller.soltName+'。点击查看详情',
|
|
|
|
path: util.http_build_query(parmdata, '/pages/customer/index'),
|
|
|
|
imageUrl: this.data.tpls[0].shareImage,
|
|
|
|
imageUrl: this.data.detail.seller.seller_image,
|
|
|
|
}
|
|
|
|
},
|
|
|
|
formatDatail(detail, dateSmart) {
|
|
...
|
...
|
@@ -232,7 +236,7 @@ Page({ |
|
|
|
}
|
|
|
|
return detail;
|
|
|
|
},
|
|
|
|
getSellerTemplateConf(sid) {
|
|
|
|
getSellerTemplateConfFun(sid) {
|
|
|
|
console.log(sid,'sidsidsidsid');
|
|
|
|
App.Seller.GetSellerTemplateConf({
|
|
|
|
sid
|
|
...
|
...
|
@@ -243,8 +247,14 @@ Page({ |
|
|
|
let reserve = JSON.parse(res.data.reserve)
|
|
|
|
let signboard = JSON.parse(res.data.signboard)
|
|
|
|
let store = JSON.parse(res.data.store)
|
|
|
|
store.images = JSON.parse(store.images)
|
|
|
|
signboard.images = JSON.parse(signboard.images)
|
|
|
|
console.log('chef', JSON.parse(res.data.chef));
|
|
|
|
console.log('home', JSON.parse(res.data.home));
|
|
|
|
console.log('marketing', JSON.parse(res.data.marketing));
|
|
|
|
console.log('reserve', JSON.parse(res.data.reserve));
|
|
|
|
console.log('signboard', JSON.parse(res.data.signboard));
|
|
|
|
console.log('store', store);
|
|
|
|
if(store.images.length>0) store.images = JSON.parse(store.images)
|
|
|
|
if(signboard && signboard.images) signboard.images = JSON.parse(signboard.images)
|
|
|
|
if (marketing.is_online && marketing.is_arrival && marketing.is_transpond) {
|
|
|
|
this.setData({
|
|
|
|
between: true
|
|
...
|
...
|
@@ -256,6 +266,12 @@ Page({ |
|
|
|
}else{
|
|
|
|
homeColor ='67,142,147,1'
|
|
|
|
}
|
|
|
|
console.log('chef', JSON.parse(res.data.chef));
|
|
|
|
console.log('home', JSON.parse(res.data.home));
|
|
|
|
console.log('marketing', JSON.parse(res.data.marketing));
|
|
|
|
console.log('reserve', JSON.parse(res.data.reserve));
|
|
|
|
console.log('signboard', JSON.parse(res.data.signboard));
|
|
|
|
console.log('store', store);
|
|
|
|
console.log(homeColor,'homeColorhomeColorhomeColor');
|
|
|
|
this.setData({
|
|
|
|
chef,
|
|
...
|
...
|
@@ -292,20 +308,15 @@ Page({ |
|
|
|
theme:'green',
|
|
|
|
homeColor:'67,142,147,1'
|
|
|
|
})
|
|
|
|
console.log(this.data.homeColor,'homeColorhomeColorhomeColor111');
|
|
|
|
console.log(this.data.homeColor,'GetSellerTemplateConf请求失败');
|
|
|
|
})
|
|
|
|
},
|
|
|
|
// 再次预订
|
|
|
|
secondbook() {
|
|
|
|
wx.reportMonitor('1013', 1)
|
|
|
|
if (this.data.list) {
|
|
|
|
wx.navigateTo({
|
|
|
|
url: './discount?sid=' + this.data.detail.seller.id + '&id=' + this.data.options.id
|
|
|
|
})
|
|
|
|
} else {
|
|
|
|
wx.redirectTo({
|
|
|
|
url: '../reserve/detail?id=' + this.data.detail.seller.id
|
|
|
|
})
|
|
|
|
}
|
|
|
|
wx.redirectTo({
|
|
|
|
url: '../reserve/detail?id=' + this.data.detail.seller.id
|
|
|
|
})
|
|
|
|
},
|
|
|
|
/**
|
|
|
|
* 生命周期函数--监听页面隐藏
|
|
...
|
...
|
@@ -334,11 +345,4 @@ Page({ |
|
|
|
onReachBottom() {
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 用户点击右上角分享
|
|
|
|
*/
|
|
|
|
onShareAppMessage() {
|
|
|
|
|
|
|
|
}
|
|
|
|
}) |
|
|
\ No newline at end of file |
...
|
...
|
|