Commit 00e74e9205c1607d0b602dd4a1eca259acfa5130

Authored by yvan.ni
1 parent 668c9400

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

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