Commit 4d5fb5e97e566d1c1c43b170963f23740b6bbd13

Authored by yiren
1 parent 80385e07

无数据样式修改、商家地址字段取值修改

... ... @@ -56,7 +56,6 @@
"pages/tcads/cmyy",
"pages/pinglun/video",
"pages/customer/detail_owner_invitation_new",
"components/modal",
"pages/me/coupon_news"
],
"requiredPrivateInfos": [
... ...
... ... @@ -97,10 +97,10 @@ Page({
looklocation: function () {
wx.reportMonitor('1015', 1)
wx.openLocation({
latitude: Number(this.data.reserve.lat),
longitude: Number(this.data.reserve.long),
latitude: Number(this.data.seller.lat),
longitude: Number(this.data.seller.long),
scale: 17,
address: this.data.reserve.address,
address: this.data.seller.addr,
success: function (res) {
console.log(res)
}
... ... @@ -150,7 +150,9 @@ Page({
is_set_ddate: reserev.is_set_ddate,
hasUpTime: reserev.type == 1 && reserev.hasRunning && reserev.status != 2,
tel: reserev.seller.seller_tel.split(',')[0],
soltName: reserev.soltName
soltName: reserev.soltName,
lat:reserev.seller.lat,
long:reserev.seller.long,
}
})
if(this.data.seller.sid=="677" || this.data.seller.sid=="26" || this.data.seller.sid=="8" || this.data.seller.sid=="4352"){
... ... @@ -158,9 +160,9 @@ Page({
is_display : false
})
}
console.log(reserev,'reserevreserevreserevreserevreserev');
console.log(this.data.seller,'sellersellersellerseller');
console.log(this.data.detail,'detaildetaildetaildetail');
console.log('reserevreserevreserevreserevreserev',reserev);
console.log('sellersellersellerseller',this.data.seller);
console.log('detaildetaildetaildetail',this.data.detail);
this.getSellerTemplateConfFun(reserev.sid);
}).catch(res=>{
console.log(res,'详情请求失败');
... ... @@ -238,38 +240,32 @@ Page({
App.Seller.GetSellerTemplateConf({
sid
}).then(res => {
let home = JSON.parse(res.data.home)
let chef = JSON.parse(res.data.chef)
let marketing = JSON.parse(res.data.marketing)
let reserve = JSON.parse(res.data.reserve)
let signboard = JSON.parse(res.data.signboard)
let store = JSON.parse(res.data.store)
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)
let home,chef,marketing,reserve,signboard,store,homeColor;
chef = res.data.chef?JSON.parse(res.data.chef):'';
reserve = res.data.reserve?JSON.parse(res.data.reserve):'';
marketing = res.data.marketing?JSON.parse(res.data.marketing):'';
signboard = res.data.signboard?JSON.parse(res.data.signboard):'';
store = res.data.store?JSON.parse(res.data.store):'';
home = res.data.home?JSON.parse(res.data.home):'';
if(store && store.images.length>0) store.images = JSON.parse(store.images)
if(signboard && signboard.images) signboard.images = JSON.parse(signboard.images)
if (marketing.is_online_book=='1' && marketing.is_transpond =='1') {
if (marketing && marketing.is_online_book=='1' && marketing.is_transpond =='1') {
this.setData({
between: true
})
}
let homeColor;
if(home.red && home.green && home.blue && home.alpha){
if(home && home.red && home.green && home.blue && home.alpha){
homeColor=home.red + ',' + home.green + ',' + home.blue + ',' + home.alpha
}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('chef', chef);
console.log('reserve', reserve);
console.log('signboard', signboard);
console.log('home', home);
console.log('store', store);
console.log(homeColor,'homeColorhomeColorhomeColor');
console.log('marketing', marketing);
console.log('homeColor',homeColor);
this.setData({
chef,
marketing,
... ... @@ -279,27 +275,21 @@ Page({
store,
homeColor //home主题颜色
})
if (home.red == '1' && home.green == '67' && home.blue == '163') {
if (home && home.red == '1' && home.green == '67' && home.blue == '163') {
this.setData({
theme: 'blue'
})
}
if (home.red == '67' && home.green == '142' && home.blue == '147') {
if (home && home.red == '67' && home.green == '142' && home.blue == '147') {
this.setData({
theme: 'green'
})
}
if (home.red == '12' && home.green == '15' && home.blue == '14') {
if (home && home.red == '12' && home.green == '15' && home.blue == '14') {
this.setData({
theme: 'blackGold'
})
}
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);
}).catch(res=>{
this.setData({
theme:'green',
... ...
... ... @@ -6,12 +6,12 @@
<scroll-view class="last-book-bg" style="line-height: 1.4;height:{{height}}px;" scroll-y>
<view class="titleImg" style="background: rgba({{homeColor}});">
<image src="{{theme=='green'?'https://qn.colorcun.com/1571679628800_.pic.jpg':theme=='blue'?'https://qn.colorcun.com/1561679628784_.pic.jpg':theme=='blackGold'?'https://qn.colorcun.com/1551679628682_.pic.jpg':''}}" class="titleIcon"></image>
<view class="title {{theme+'Title'}}">{{home.title?home.title:seller.name}}</view>
<view class="title {{theme+'Title'}}">{{home?home.title:seller.name}}</view>
<view class="info {{theme+'Info'}}">
{{home.slogan}}
{{home?home.slogan:''}}
</view>
</view>
<image src="{{home.image?home.image:detail.seller.seller_image}}" class="homeImage" mode="widthFix"></image>
<image src="{{home?home.image:detail.seller.seller_image}}" class="homeImage" mode="widthFix"></image>
<view class="reservationInfo flex-ll">
<view class="line">
</view>
... ... @@ -40,23 +40,23 @@
<view class="label">【地址】</view>
<view class="contentData">{{reserve.address?reserve.address:detail.seller.map_address}}</view>
</view> -->
<view class="flex-11" wx:if="{{reserve.park_info}}">
<view class="flex-11" wx:if="{{reserve && reserve.park_info}}">
<view class="label">【停车】</view>
<view class="contentData">{{reserve.park_info}}</view>
</view>
<view class="flex-11" wx:if="{{reserve.seller_phone || detail.seller.phone}}">
<view class="flex-11" wx:if="{{ reserve && (reserve.seller_phone || detail.seller.phone)}}">
<view class="label">【联系】</view>
<view class="contentData">{{reserve.seller_phone?reserve.seller_phone:detail.seller.phone}}</view>
<view class="contentData">{{reserve?reserve.seller_phone:detail.seller.phone}}</view>
</view>
<view class="welcome">
欢迎垂询,恭候光临!
</view>
<block wx:if="{{detail.sid!='677' && reserve.manager_phone && reserve.manager_wechat}}">
<block wx:if="{{detail.sid!='677' && reserve && reserve.manager_phone && reserve.manager_wechat}}">
<view class="handleInfo">
<image src="{{reserve.manager_image}}" class="headerimg" mode="aspectFill"></image>
<image wx:if="{{reserve && reserve.manager_image}}" src="{{reserve.manager_image}}" class="headerimg" mode="aspectFill"></image>
<view class="handle">
<text>专属服务:{{reserve.manager_phone}}</text>
<text>服务电话:{{reserve.manager_wechat}}</text>
<text>专属服务:{{reserve?reserve.manager_phone:''}}</text>
<text>服务电话:{{reserve?reserve.manager_wechat:''}}</text>
</view>
<view class="handle">
<view class="font22r brownFont" bindtap="call">拨打电话</view>
... ... @@ -70,7 +70,7 @@
<image src="https://qn.colorcun.com/WechatIMG256.png" mode="" />
<view class="name">
<text>{{seller.name?seller.name:reserve.seller_name}}</text>
<text>{{reserve.address?reserve.address:detail.seller.map_address}}</text>
<text>{{seller?seller.addr:reserev.seller.map_address}}</text>
</view>
</view>
<!-- <view class="visitor">
... ... @@ -177,7 +177,7 @@
</view>
</view>
</view>
<view class="specialServices" wx:if="{{detail && detail.seller.is_open_order==1 && marketing.is_order=='1'}}">
<view class="specialServices" wx:if="{{detail && detail.seller.is_open_order==1 && marketing && marketing.is_order=='1'}}">
<view class="rubric">
特供服务
</view>
... ... @@ -186,7 +186,7 @@
</view>
<view class="endStyle">
<view class="book-item-font second-book-button flex-cc font30r cook" style="position: relative;">
<view wx:if="{{detail && detail.seller.is_open_order==1 && marketing.is_order=='1'}}" class="menu-item menu-seller-item flex-ll" bindtap="cookbook">
<view wx:if="{{detail && detail.seller.is_open_order==1 && marketing && marketing.is_order=='1'}}" class="menu-item menu-seller-item flex-ll" bindtap="cookbook">
去点餐
</view>
</view>
... ... @@ -196,7 +196,7 @@
<view class="rubric rubric1">
特别优惠
</view>
<view class="preferentialItems" wx:if="{{marketing.is_coupon=='1'}}">
<view class="preferentialItems" wx:if="{{marketing && marketing.is_coupon=='1'}}">
<view class="left">
<view class="top">
<text>200元代金券</text>
... ... @@ -211,7 +211,7 @@
去抢购
</view>
</view>
<view class="preferentialItems" wx:if="{{marketing.is_recharge=='1'}}">
<view class="preferentialItems" wx:if="{{marketing && marketing.is_recharge=='1'}}">
<view class="left">
<view class="top">
<text>充1000赠300</text>
... ... @@ -226,9 +226,9 @@
</view>
</view>
<view class="vips">
<image src="{{marketing.logo?marketing.logo:detail.seller.seller_image}}" mode="heightFix" />
<view class="news" wx:if="{{marketing.wecomle}}">
{{marketing.wecomle}}
<image wx:if="{{marketing && marketing.logo}}" src="{{marketing.logo?marketing.logo:''}}" mode="heightFix" />
<view class="news" wx:if="{{marketing && marketing.wecomle}}">
{{marketing?marketing.wecomle:''}}
</view>
<!-- <view wx:if="{{marketing.is_link}}" class="font24r favouredPolicy">
点击了解更多会员优惠政策
... ...