Commit 30095987aa8e5896a1aea87e20c871aabbb0cfa7

Authored by yiren
1 parent b279de9d

新邀请函

... ... @@ -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
... ...
... ... @@ -20,31 +20,31 @@
<view>尊敬的贵宾,您好!</view>
<view>非常感谢您选择{{seller.name?seller.name:reserve.seller_name}}!</view>
</view>
<view class="flex-11">
<view class="flex-11" wx:if="{{seller.date}}">
<view class="label">【日期】</view>
<view class="contentData">{{seller.date}}</view>
</view>
<view class="flex-11">
<view class="flex-11" wx:if="{{seller.soltName}}">
<view class="label">【餐段】</view>
<view class="contentData">{{seller.soltName}}</view>
</view>
<view class="flex-11">
<view class="flex-11" wx:if="{{seller.region || seller.room}}">
<view class="label">【包间】</view>
<view class="contentData">{{seller.region}}{{seller.room}}</view>
</view>
<!-- <view class="flex-11">
<!-- <view class="flex-11" wx:if="{{reserve.numderPeople}}">
<view class="label">【人数】</view>
<view class="contentData">{{reserve.numderPeople}}位</view>
</view>-->
<view class="flex-11">
<!-- <view class="flex-11" wx:if="{{reserve.park_info || detail.seller.map_address}}">
<view class="label">【地址】</view>
<view class="contentData">{{reserve.address?reserve.address:detail.seller.map_address}}</view>
</view>
<view class="flex-11">
</view> -->
<view class="flex-11" wx:if="{{reserve.park_info}}">
<view class="label">【停车】</view>
<view class="contentData">{{reserve.park_info}}</view>
</view>
<view class="flex-11">
<view class="flex-11" wx:if="{{reserve.seller_phone || detail.seller.phone}}">
<view class="label">【联系】</view>
<view class="contentData">{{reserve.seller_phone?reserve.seller_phone:detail.seller.phone}}</view>
</view>
... ... @@ -245,9 +245,9 @@
</view>
</view>
</scroll-view>
<view wx:if="{{marketing.is_transpond=='1'}}" class="{{between?'all-button flex-lr between':'all-button flex-lr'}}">
<!-- <view wx:if="{{marketing.is_online=='1'}}" class="book-item-font second-book-button flex-cc font30r" bindtap="secondbook" style="position: relative;">再次预订
</view> -->
<view wx:if="{{marketing.is_transpond=='1'}}" class="{{between?'all-button flex-lr between':'all-button flex-lr sharewidth'}}">
<view wx:if="{{marketing.is_online=='1'}}" class="book-item-font second-book-button flex-cc font30r" bindtap="secondbook" style="position: relative;">再次预订
</view>
<!-- <view wx:if="{{marketing.is_arrival}}" class="book-item-font second-book-button flex-cc font30r centerBtn" bindtap="secondbook" style="position: relative;">确认赴约
</view> -->
<block>
... ...
... ... @@ -561,6 +561,9 @@
.shareItem {
width: 100%;
margin: 0;
background: #fff;
color: #0244a4;
background: linear-gradient(104.24deg, #4c8dad -57.47%, #0143a3 55.72%, #42a5ff 148.72%);
color: #fff;
}
.between .shareItem{
width: 65%;
}
\ No newline at end of file
... ...