Commit 08006c504e1e689e41fc59e03e49362ec17415f4

Authored by yvan.ni
1 parent 19f88573

1. 自定义模板里面 不同的手机显示的主页轮播图 显示的图片切换按钮 不一样的bug优化

components/diy_advertising/diy_advertising.js
... ... @@ -16,7 +16,7 @@ Component({
16 16 interval:3000,
17 17 duration:1000,
18 18 someData: {},
19   - max_sw_height:getApp().globalData.windowWidth,
  19 + max_sw_height:260,
20 20 },
21 21 methods: {
22 22  
... ... @@ -34,7 +34,11 @@ Component({
34 34 var ratio = imgwidth / imgheight;
35 35 //计算的高度值
36 36 var viewHeight = 715 / ratio;
37   - if (this.data.max_sw_height < viewHeight) this.setData({ max_sw_height: viewHeight });
  37 + var hei=this.data.max_sw_height;
  38 +
  39 + if (hei< viewHeight) {
  40 + this.setData({ max_sw_height: viewHeight });
  41 + }
38 42 }
39 43 }
40 44 })
... ...
components/diy_advertising/diy_advertising.wxml
... ... @@ -412,14 +412,14 @@
412 412 <navigator url="{{item.wxapp_imgurl}}" class="s1_gk_a1" wx:if="{{g_filter.has_char(item.wxapp_imgurl,'plugin')>=0}}">
413 413 <swiper-item>
414 414 <image src="{{item.src}}" bindload="imageLoad" data-index="{{index}}" class="slide-image" mode="widthFix" />
415   - <view class="title">{{item.title}}</view>
  415 + <view class="title" wx:if="{{title}}">{{item.title}}</view>
416 416 </swiper-item>
417 417 </navigator>
418 418  
419 419 <view data-url="{{item.wxapp_imgurl}}" class="s1_gk_a1" bindtap="go_url" wx:else>
420 420 <swiper-item>
421 421 <image src="{{item.src}}" bindload="imageLoad" data-index="{{index}}" class="slide-image" mode="widthFix" />
422   - <view class="title">{{item.title}}</view>
  422 + <view class="title" wx:if="{{title}}">{{item.title}}</view>
423 423 </swiper-item>
424 424 </view>
425 425  
... ...