Commit 0c40d7c33e2e24d01d696271e447b645124ad334

Authored by yvan.ni
1 parent c4d77059

广告换行的优化

components/diy_advertising/diy_advertising.wxml
... ... @@ -129,11 +129,11 @@
129 129 </view>
130 130 <view class="clear"></view>
131 131 <!--2行三列-->
132   -<view class="{{object.aline ? 's4':''}}" wx:if='{{object.style==3}}' style="padding:0 {{object.two_side}}rpx;display: flex;{{object.aline ? ('flex-wrap: wrap;justify-content: space-between;') :''}} background-color:{{object.bg_color?object.bg_color:'none'}}">
  132 +<view class="{{object.aline>0 ? 's4':''}}" wx:if='{{object.style==3}}' style="padding:0 {{object.two_side}}rpx;display: flex;{{object.aline>0 ? ('flex-wrap: wrap;justify-content: space-between;') :''}} background-color:{{object.bg_color?object.bg_color:'none'}}">
133 133  
134 134 <block wx:for="{{object.data}}" wx:key="{{index}}">
135 135  
136   - <view class='s4_gk' wx:if="{{index==0}}" style="{{object.aline ? ('width:'+(750-2*object.two_side-2*object.jian_ge)/3+'rpx;') : 'flex:1;float:none;'}} ">
  136 + <view class='s4_gk' wx:if="{{index==0}}" style="{{object.aline>0 ? ('width:'+(750-2*object.two_side-2*object.jian_ge)/3+'rpx;') : 'flex:1;float:none;'}} ">
137 137 <block wx:if="{{item.src==''}}">
138 138 <text>200*200</text>
139 139 </block>
... ... @@ -169,7 +169,7 @@
169 169 </block>
170 170 </view>
171 171  
172   - <view class='s4_gk' wx:else style="{{object.aline ? ('width:'+(750-2*object.two_side-2*object.jian_ge)/3+'rpx;') : ('flex:1;float:none;margin-left:'+object.jian_ge+'rpx')}} ">
  172 + <view class='s4_gk' wx:else style="{{object.aline>0 ? ('width:'+(750-2*object.two_side-2*object.jian_ge)/3+'rpx;') : ('flex:1;float:none;margin-left:'+object.jian_ge+'rpx')}} ">
173 173 <block wx:if="{{item.src==''}}">
174 174 <text>200*200</text>
175 175 </block>
... ... @@ -206,7 +206,7 @@
206 206 </block>
207 207 </view>
208 208 </block>
209   - <view class="s4_gk" wx:if="{{object.aline && (object.data.length % 3)>0}}" style="{{('width:'+(750-2*object.two_side-2*object.jian_ge)/3+'rpx;height:0;')}}"></view>
  209 + <view class="s4_gk" wx:if="{{object.aline>0 && (object.data.length % 3)>0}}" style="{{('width:'+(750-2*object.two_side-2*object.jian_ge)/3+'rpx;height:0;')}}"></view>
210 210 </view>
211 211 <view class="clear"></view>
212 212  
... ...