Commit 92670cbfd4d00fcbd1f659c68ff0d3e6ccdb8e60

Authored by vking
1 parent f5c2071d

fix ui

@@ -17,6 +17,7 @@ Page({ @@ -17,6 +17,7 @@ Page({
17 hasOnlineReserve:false, 17 hasOnlineReserve:false,
18 activeTab:'detail', 18 activeTab:'detail',
19 hasFullHouse:false,//满房 19 hasFullHouse:false,//满房
  20 + hasDishesImage:false,//是否有菜品图
20 }, 21 },
21 22
22 /** 23 /**
@@ -92,9 +93,11 @@ Page({ @@ -92,9 +93,11 @@ Page({
92 seller.room_image[i]=url.replace('//qn.colorcun','//nosqn.colorcun') 93 seller.room_image[i]=url.replace('//qn.colorcun','//nosqn.colorcun')
93 }) 94 })
94 } 95 }
  96 + let hasDishesImage=false;
95 if(seller.dishes.length>0){ 97 if(seller.dishes.length>0){
96 seller.dishes.some((dishes)=>{ 98 seller.dishes.some((dishes)=>{
97 if(dishes.image){ 99 if(dishes.image){
  100 + hasDishesImage=true
98 dishes.image=dishes.image.replace('//qn.colorcun','//nosqn.colorcun') 101 dishes.image=dishes.image.replace('//qn.colorcun','//nosqn.colorcun')
99 } 102 }
100 }) 103 })
@@ -113,6 +116,7 @@ Page({ @@ -113,6 +116,7 @@ Page({
113 } 116 }
114 this.setData({ 117 this.setData({
115 seller:seller, 118 seller:seller,
  119 + hasDishesImage:hasDishesImage,
116 hasOnlineReserve:seller.is_online_reserve==1, 120 hasOnlineReserve:seller.is_online_reserve==1,
117 }) 121 })
118 } 122 }
@@ -131,7 +131,7 @@ @@ -131,7 +131,7 @@
131 <view class="line"></view> 131 <view class="line"></view>
132 <view class="name">推荐菜品</view> 132 <view class="name">推荐菜品</view>
133 </view> 133 </view>
134 - <scroll-view 134 + <scroll-view wx:if="{{hasDishesImage}}"
135 scroll-x 135 scroll-x
136 class="cais" 136 class="cais"
137 scroll-into-view="{{toView}}" 137 scroll-into-view="{{toView}}"
@@ -237,9 +237,6 @@ @@ -237,9 +237,6 @@
237 height: 460rpx; 237 height: 460rpx;
238 margin-left: -5%; 238 margin-left: -5%;
239 } 239 }
240 -.cais:not(:empty){  
241 - height: 0;  
242 -}  
243 .cais-views{ 240 .cais-views{
244 display: inline-block; 241 display: inline-block;
245 margin-right: 20rpx; 242 margin-right: 20rpx;
@@ -350,7 +350,7 @@ @@ -350,7 +350,7 @@
350 "id": 38, 350 "id": 38,
351 "name": "pages/reserve/detail 在线订座 ", 351 "name": "pages/reserve/detail 在线订座 ",
352 "pathName": "pages/reserve/detail", 352 "pathName": "pages/reserve/detail",
353 - "query": "id=1", 353 + "query": "id=7",
354 "scene": null 354 "scene": null
355 }, 355 },
356 { 356 {