Commit 2bc92be6d2322185a7f6d14333624ffcbd51cca5
1 parent
674924ed
自定义模板广告优化
Showing
2 changed files
with
6 additions
and
6 deletions
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;' :''}} background-color:{{object.bg_color?object.bg_color:'none'}}"> | |
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;margin-top:-'+object.jian_ge+'rpx;') :''}} 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 ? ('width:'+(750-2*object.two_side-2*object.jian_ge)/3+'rpx;margin-top:'+object.jian_ge+'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 ? ('width:'+(750-2*object.two_side-2*object.jian_ge)/3+'rpx;margin-top:'+object.jian_ge+'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> |
... | ... | @@ -205,8 +205,8 @@ |
205 | 205 | </block> |
206 | 206 | </block> |
207 | 207 | </view> |
208 | - | |
209 | 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;margin-top:'+object.jian_ge+'rpx;height:0;')}}"></view> | |
210 | 210 | </view> |
211 | 211 | <view class="clear"></view> |
212 | 212 | ... | ... |
components/diy_advertising/diy_advertising.wxss
... | ... | @@ -156,12 +156,12 @@ |
156 | 156 | float: left; |
157 | 157 | margin-left: 10rpx; |
158 | 158 | } |
159 | -.s4:after{ | |
159 | +/* .s4:after{ | |
160 | 160 | content: ''; |
161 | 161 | height: 0; |
162 | 162 | width: 30%; |
163 | 163 | visibility: hidden; |
164 | -} | |
164 | +} */ | |
165 | 165 | .s4_gk { |
166 | 166 | /* background-color: rgb(129, 213, 249); */ |
167 | 167 | color: #fff; | ... | ... |