Commit 00e74e9205c1607d0b602dd4a1eca259acfa5130

Authored by yvan.ni
1 parent 668c9400

广告图片变形,和加载的时候的效果优化

packageA/pages/jfbuy/jfbuy.js
@@ -158,6 +158,8 @@ Page({ @@ -158,6 +158,8 @@ Page({
158 'ad_code': os.imghost + a[0].ad_code, 158 'ad_code': os.imghost + a[0].ad_code,
159 }; 159 };
160 th.setData({ad:tt}) 160 th.setData({ad:tt})
  161 + }else{
  162 + th.setData({isshow:1})
161 } 163 }
162 } 164 }
163 }) 165 })
@@ -427,7 +429,7 @@ Page({ @@ -427,7 +429,7 @@ Page({
427 //计算的高度值 429 //计算的高度值
428 var viewHeight = this.data.clientWidth / ratio; 430 var viewHeight = this.data.clientWidth / ratio;
429 var con_heihgt=this.data.clientHeight-viewHeight; 431 var con_heihgt=this.data.clientHeight-viewHeight;
430 - this.setData({con_heihgt:con_heihgt}) 432 + this.setData({con_heihgt:con_heihgt,isshow:1})
431 433
432 } 434 }
433 }) 435 })
434 \ No newline at end of file 436 \ No newline at end of file
packageA/pages/jfbuy/jfbuy.wxml
1 <!-- <wxs module="g_filter" src="g_filter.wxs"></wxs> --> 1 <!-- <wxs module="g_filter" src="g_filter.wxs"></wxs> -->
2 -<view class="container"> 2 +<view class="container" >
3 <!-- 搜索框 --> 3 <!-- 搜索框 -->
4 <!-- <view class="search-container"> 4 <!-- <view class="search-container">
5 <view class="input-container"><input bindinput="set_search_value" class="search" type="text" placeholder="请输入您想查找的商品信息"/></view> 5 <view class="input-container"><input bindinput="set_search_value" class="search" type="text" placeholder="请输入您想查找的商品信息"/></view>
6 <view bindtap="search_data" class="btn-search">搜索</view> 6 <view bindtap="search_data" class="btn-search">搜索</view>
7 </view> --> 7 </view> -->
8 <view wx:if="{{ad}}"> 8 <view wx:if="{{ad}}">
9 - <image src="{{ad.ad_code}}" mode="widthFix" bindload="imageLoad"></image> 9 + <image src="{{ad.ad_code}}" mode="widthFix" bindload="imageLoad" style="width: 100%;"></image>
10 </view> 10 </view>
11 <view wx:else class="banner-container flex"> 11 <view wx:else class="banner-container flex">
12 <image src="{{url}}/miniapp/images/integral/liwu.png?v=1" class="banner"></image> 12 <image src="{{url}}/miniapp/images/integral/liwu.png?v=1" class="banner"></image>
@@ -17,7 +17,7 @@ @@ -17,7 +17,7 @@
17 </view> 17 </view>
18 18
19 <!-- 列表 --> 19 <!-- 列表 -->
20 - <view class="list-container" style="{{ad?('height:'+con_heihgt+'px;'):''}}"> 20 + <view wx:if="{{isshow}}" class="list-container" style="{{ad?('height:'+con_heihgt+'px;'):''}}">
21 <!-- 标题 --> 21 <!-- 标题 -->
22 <view class="title" > 22 <view class="title" >
23 <block wx:for="{{tab}}"> 23 <block wx:for="{{tab}}">