|
@@ -58,7 +58,9 @@ Page({ |
|
@@ -58,7 +58,9 @@ Page({ |
|
58
|
/**
|
58
|
/**
|
|
59
|
* 生命周期函数--监听页面初次渲染完成
|
59
|
* 生命周期函数--监听页面初次渲染完成
|
|
60
|
*/
|
60
|
*/
|
|
61
|
- onReady() {},
|
61
|
+ onReady() {
|
|
|
|
62
|
+ this.getDetail();
|
|
|
|
63
|
+ },
|
|
62
|
/**
|
64
|
/**
|
|
63
|
* 用户点击右上角分享
|
65
|
* 用户点击右上角分享
|
|
64
|
*/
|
66
|
*/
|
|
@@ -72,7 +74,6 @@ Page({ |
|
@@ -72,7 +74,6 @@ Page({ |
|
72
|
* 生命周期函数--监听页面显示
|
74
|
* 生命周期函数--监听页面显示
|
|
73
|
*/
|
75
|
*/
|
|
74
|
onShow: function () {
|
76
|
onShow: function () {
|
|
75
|
- this.getDetail();
|
|
|
|
76
|
},
|
77
|
},
|
|
77
|
cli() {
|
78
|
cli() {
|
|
78
|
wx.setClipboardData({
|
79
|
wx.setClipboardData({
|
|
@@ -155,7 +156,9 @@ Page({ |
|
@@ -155,7 +156,9 @@ Page({ |
|
155
|
console.log(reserev,'reserevreserevreserevreserevreserev');
|
156
|
console.log(reserev,'reserevreserevreserevreserevreserev');
|
|
156
|
console.log(this.data.seller,'sellersellersellerseller');
|
157
|
console.log(this.data.seller,'sellersellersellerseller');
|
|
157
|
console.log(this.data.detail,'detaildetaildetaildetail');
|
158
|
console.log(this.data.detail,'detaildetaildetaildetail');
|
|
158
|
- this.getSellerTemplateConf(reserev.sid);
|
159
|
+ this.getSellerTemplateConfFun(reserev.sid);
|
|
|
|
160
|
+ }).catch(res=>{
|
|
|
|
161
|
+ console.log(res,'详情请求失败');
|
|
159
|
})
|
162
|
})
|
|
160
|
},
|
163
|
},
|
|
161
|
cookbook() {
|
164
|
cookbook() {
|
|
@@ -200,15 +203,16 @@ Page({ |
|
@@ -200,15 +203,16 @@ Page({ |
|
200
|
id: this.id,
|
203
|
id: this.id,
|
|
201
|
fromid: getApp().openid,
|
204
|
fromid: getApp().openid,
|
|
202
|
hasInvitation: 1,
|
205
|
hasInvitation: 1,
|
|
203
|
- tplid: this.data.options.tplid,
|
206
|
+ tplid: this.data.options.tplid
|
|
204
|
}
|
207
|
}
|
|
205
|
if (this.data.options.uid) {
|
208
|
if (this.data.options.uid) {
|
|
206
|
parmdata.uid = this.data.options.uid;
|
209
|
parmdata.uid = this.data.options.uid;
|
|
207
|
}
|
210
|
}
|
|
|
|
211
|
+ console.log('seller_imageseller_imageseller_imageseller_imageseller_image',this.data.detail.seller.seller_image);
|
|
208
|
return {
|
212
|
return {
|
|
209
|
- title: this.data.tpls[0].shareTitle,
|
213
|
+ title: '邀请您于'+this.data.seller.date+'一起共进'+this.data.seller.soltName+'。点击查看详情',
|
|
210
|
path: util.http_build_query(parmdata, '/pages/customer/index'),
|
214
|
path: util.http_build_query(parmdata, '/pages/customer/index'),
|
|
211
|
- imageUrl: this.data.tpls[0].shareImage,
|
215
|
+ imageUrl: this.data.detail.seller.seller_image,
|
|
212
|
}
|
216
|
}
|
|
213
|
},
|
217
|
},
|
|
214
|
formatDatail(detail, dateSmart) {
|
218
|
formatDatail(detail, dateSmart) {
|
|
@@ -232,7 +236,7 @@ Page({ |
|
@@ -232,7 +236,7 @@ Page({ |
|
232
|
}
|
236
|
}
|
|
233
|
return detail;
|
237
|
return detail;
|
|
234
|
},
|
238
|
},
|
|
235
|
- getSellerTemplateConf(sid) {
|
239
|
+ getSellerTemplateConfFun(sid) {
|
|
236
|
console.log(sid,'sidsidsidsid');
|
240
|
console.log(sid,'sidsidsidsid');
|
|
237
|
App.Seller.GetSellerTemplateConf({
|
241
|
App.Seller.GetSellerTemplateConf({
|
|
238
|
sid
|
242
|
sid
|
|
@@ -243,8 +247,14 @@ Page({ |
|
@@ -243,8 +247,14 @@ Page({ |
|
243
|
let reserve = JSON.parse(res.data.reserve)
|
247
|
let reserve = JSON.parse(res.data.reserve)
|
|
244
|
let signboard = JSON.parse(res.data.signboard)
|
248
|
let signboard = JSON.parse(res.data.signboard)
|
|
245
|
let store = JSON.parse(res.data.store)
|
249
|
let store = JSON.parse(res.data.store)
|
|
246
|
- store.images = JSON.parse(store.images)
|
|
|
|
247
|
- signboard.images = JSON.parse(signboard.images)
|
250
|
+ console.log('chef', JSON.parse(res.data.chef));
|
|
|
|
251
|
+ console.log('home', JSON.parse(res.data.home));
|
|
|
|
252
|
+ console.log('marketing', JSON.parse(res.data.marketing));
|
|
|
|
253
|
+ console.log('reserve', JSON.parse(res.data.reserve));
|
|
|
|
254
|
+ console.log('signboard', JSON.parse(res.data.signboard));
|
|
|
|
255
|
+ console.log('store', store);
|
|
|
|
256
|
+ if(store.images.length>0) store.images = JSON.parse(store.images)
|
|
|
|
257
|
+ if(signboard && signboard.images) signboard.images = JSON.parse(signboard.images)
|
|
248
|
if (marketing.is_online && marketing.is_arrival && marketing.is_transpond) {
|
258
|
if (marketing.is_online && marketing.is_arrival && marketing.is_transpond) {
|
|
249
|
this.setData({
|
259
|
this.setData({
|
|
250
|
between: true
|
260
|
between: true
|
|
@@ -256,6 +266,12 @@ Page({ |
|
@@ -256,6 +266,12 @@ Page({ |
|
256
|
}else{
|
266
|
}else{
|
|
257
|
homeColor ='67,142,147,1'
|
267
|
homeColor ='67,142,147,1'
|
|
258
|
}
|
268
|
}
|
|
|
|
269
|
+ console.log('chef', JSON.parse(res.data.chef));
|
|
|
|
270
|
+ console.log('home', JSON.parse(res.data.home));
|
|
|
|
271
|
+ console.log('marketing', JSON.parse(res.data.marketing));
|
|
|
|
272
|
+ console.log('reserve', JSON.parse(res.data.reserve));
|
|
|
|
273
|
+ console.log('signboard', JSON.parse(res.data.signboard));
|
|
|
|
274
|
+ console.log('store', store);
|
|
259
|
console.log(homeColor,'homeColorhomeColorhomeColor');
|
275
|
console.log(homeColor,'homeColorhomeColorhomeColor');
|
|
260
|
this.setData({
|
276
|
this.setData({
|
|
261
|
chef,
|
277
|
chef,
|
|
@@ -292,20 +308,15 @@ Page({ |
|
@@ -292,20 +308,15 @@ Page({ |
|
292
|
theme:'green',
|
308
|
theme:'green',
|
|
293
|
homeColor:'67,142,147,1'
|
309
|
homeColor:'67,142,147,1'
|
|
294
|
})
|
310
|
})
|
|
295
|
- console.log(this.data.homeColor,'homeColorhomeColorhomeColor111');
|
311
|
+ console.log(this.data.homeColor,'GetSellerTemplateConf请求失败');
|
|
296
|
})
|
312
|
})
|
|
297
|
},
|
313
|
},
|
|
|
|
314
|
+ // 再次预订
|
|
298
|
secondbook() {
|
315
|
secondbook() {
|
|
299
|
wx.reportMonitor('1013', 1)
|
316
|
wx.reportMonitor('1013', 1)
|
|
300
|
- if (this.data.list) {
|
|
|
|
301
|
- wx.navigateTo({
|
|
|
|
302
|
- url: './discount?sid=' + this.data.detail.seller.id + '&id=' + this.data.options.id
|
|
|
|
303
|
- })
|
|
|
|
304
|
- } else {
|
|
|
|
305
|
- wx.redirectTo({
|
|
|
|
306
|
- url: '../reserve/detail?id=' + this.data.detail.seller.id
|
|
|
|
307
|
- })
|
|
|
|
308
|
- }
|
317
|
+ wx.redirectTo({
|
|
|
|
318
|
+ url: '../reserve/detail?id=' + this.data.detail.seller.id
|
|
|
|
319
|
+ })
|
|
309
|
},
|
320
|
},
|
|
310
|
/**
|
321
|
/**
|
|
311
|
* 生命周期函数--监听页面隐藏
|
322
|
* 生命周期函数--监听页面隐藏
|
|
@@ -334,11 +345,4 @@ Page({ |
|
@@ -334,11 +345,4 @@ Page({ |
|
334
|
onReachBottom() {
|
345
|
onReachBottom() {
|
|
335
|
|
346
|
|
|
336
|
},
|
347
|
},
|
|
337
|
-
|
|
|
|
338
|
- /**
|
|
|
|
339
|
- * 用户点击右上角分享
|
|
|
|
340
|
- */
|
|
|
|
341
|
- onShareAppMessage() {
|
|
|
|
342
|
-
|
|
|
|
343
|
- }
|
|
|
|
344
|
}) |
348
|
}) |