Commit 30095987aa8e5896a1aea87e20c871aabbb0cfa7

Authored by yiren
1 parent b279de9d

新邀请函

@@ -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 })
@@ -20,31 +20,31 @@ @@ -20,31 +20,31 @@
20 <view>尊敬的贵宾,您好!</view> 20 <view>尊敬的贵宾,您好!</view>
21 <view>非常感谢您选择{{seller.name?seller.name:reserve.seller_name}}!</view> 21 <view>非常感谢您选择{{seller.name?seller.name:reserve.seller_name}}!</view>
22 </view> 22 </view>
23 - <view class="flex-11"> 23 + <view class="flex-11" wx:if="{{seller.date}}">
24 <view class="label">【日期】</view> 24 <view class="label">【日期】</view>
25 <view class="contentData">{{seller.date}}</view> 25 <view class="contentData">{{seller.date}}</view>
26 </view> 26 </view>
27 - <view class="flex-11"> 27 + <view class="flex-11" wx:if="{{seller.soltName}}">
28 <view class="label">【餐段】</view> 28 <view class="label">【餐段】</view>
29 <view class="contentData">{{seller.soltName}}</view> 29 <view class="contentData">{{seller.soltName}}</view>
30 </view> 30 </view>
31 - <view class="flex-11"> 31 + <view class="flex-11" wx:if="{{seller.region || seller.room}}">
32 <view class="label">【包间】</view> 32 <view class="label">【包间】</view>
33 <view class="contentData">{{seller.region}}{{seller.room}}</view> 33 <view class="contentData">{{seller.region}}{{seller.room}}</view>
34 </view> 34 </view>
35 - <!-- <view class="flex-11"> 35 + <!-- <view class="flex-11" wx:if="{{reserve.numderPeople}}">
36 <view class="label">【人数】</view> 36 <view class="label">【人数】</view>
37 <view class="contentData">{{reserve.numderPeople}}位</view> 37 <view class="contentData">{{reserve.numderPeople}}位</view>
38 </view>--> 38 </view>-->
39 - <view class="flex-11"> 39 + <!-- <view class="flex-11" wx:if="{{reserve.park_info || detail.seller.map_address}}">
40 <view class="label">【地址】</view> 40 <view class="label">【地址】</view>
41 <view class="contentData">{{reserve.address?reserve.address:detail.seller.map_address}}</view> 41 <view class="contentData">{{reserve.address?reserve.address:detail.seller.map_address}}</view>
42 - </view>  
43 - <view class="flex-11"> 42 + </view> -->
  43 + <view class="flex-11" wx:if="{{reserve.park_info}}">
44 <view class="label">【停车】</view> 44 <view class="label">【停车】</view>
45 <view class="contentData">{{reserve.park_info}}</view> 45 <view class="contentData">{{reserve.park_info}}</view>
46 </view> 46 </view>
47 - <view class="flex-11"> 47 + <view class="flex-11" wx:if="{{reserve.seller_phone || detail.seller.phone}}">
48 <view class="label">【联系】</view> 48 <view class="label">【联系】</view>
49 <view class="contentData">{{reserve.seller_phone?reserve.seller_phone:detail.seller.phone}}</view> 49 <view class="contentData">{{reserve.seller_phone?reserve.seller_phone:detail.seller.phone}}</view>
50 </view> 50 </view>
@@ -245,9 +245,9 @@ @@ -245,9 +245,9 @@
245 </view> 245 </view>
246 </view> 246 </view>
247 </scroll-view> 247 </scroll-view>
248 -<view wx:if="{{marketing.is_transpond=='1'}}" class="{{between?'all-button flex-lr between':'all-button flex-lr'}}">  
249 - <!-- <view wx:if="{{marketing.is_online=='1'}}" class="book-item-font second-book-button flex-cc font30r" bindtap="secondbook" style="position: relative;">再次预订  
250 - </view> --> 248 +<view wx:if="{{marketing.is_transpond=='1'}}" class="{{between?'all-button flex-lr between':'all-button flex-lr sharewidth'}}">
  249 + <view wx:if="{{marketing.is_online=='1'}}" class="book-item-font second-book-button flex-cc font30r" bindtap="secondbook" style="position: relative;">再次预订
  250 + </view>
251 <!-- <view wx:if="{{marketing.is_arrival}}" class="book-item-font second-book-button flex-cc font30r centerBtn" bindtap="secondbook" style="position: relative;">确认赴约 251 <!-- <view wx:if="{{marketing.is_arrival}}" class="book-item-font second-book-button flex-cc font30r centerBtn" bindtap="secondbook" style="position: relative;">确认赴约
252 </view> --> 252 </view> -->
253 <block> 253 <block>
@@ -561,6 +561,9 @@ @@ -561,6 +561,9 @@
561 .shareItem { 561 .shareItem {
562 width: 100%; 562 width: 100%;
563 margin: 0; 563 margin: 0;
564 - background: #fff;  
565 - color: #0244a4; 564 + background: linear-gradient(104.24deg, #4c8dad -57.47%, #0143a3 55.72%, #42a5ff 148.72%);
  565 + color: #fff;
  566 +}
  567 +.between .shareItem{
  568 + width: 65%;
566 } 569 }