Commit d68fc47aa841cb0c48d78021d524d0a08379447e

Authored by 前端开发-罗建龙
1 parent 91fe5eba

列表样式

components/diy_seckill/diy_seckill.js
... ... @@ -37,7 +37,8 @@ Component({
37 37 timer: null,
38 38 user_id:0,
39 39 img_width:100,
40   - img_height:100
  40 + img_height:100,
  41 + swiperHeight:0
41 42 },
42 43  
43 44 pageLifetimes: {
... ... @@ -69,7 +70,6 @@ Component({
69 70  
70 71 ready: function () {
71 72 var g_id = this.data.object;
72   -
73 73 this.init(g_id);
74 74 this.data.user_id=getApp().globalData.user_id;
75 75 },
... ... @@ -125,17 +125,7 @@ Component({
125 125 th.no_gid_set();
126 126 }
127 127 },
128   - imageLoad(e){
129   - var width=e.detail.width, //获取图片真实宽度
130   - height=e.detail.height,
131   - ratio=width/height; //图片的真实宽高比例
132   - let object=this.data.object
133   - let picture_scale=object.picture_scale
134   - if (condition) {
135   -
136   - }
137 128  
138   - },
139 129 //当是默认的情况
140 130 no_gid_set() {
141 131 var user_id=getApp().globalData.user_id;
... ... @@ -207,26 +197,37 @@ Component({
207 197  
208 198  
209 199 Promise.all(promisies).then(() => {
210   -
211 200 // 判断活动是否结束
212 201 for(let i in all_array){
213 202 let item=all_array[i];
214 203 if(newTime > item.end_time) {
215 204 all_array[i].status = 3;
216   - };
217   -
  205 + };
218 206 }
219 207  
220   - var arr = new Array();
221   - //--三个三个一组---
222   - for (var i = 0; i < all_array.length; i += 3) {
223   - arr.push(all_array.slice(i, i + 3));
224   - }
  208 + var arr = new Array();
  209 + if (th.data.object.style==6) {
  210 + //--三个三个一组---
  211 + for (var i = 0; i < all_array.length; i += 2) {
  212 + arr.push(all_array.slice(i, i + 2));
  213 + }
  214 +
  215 + }else{
  216 + //--三个三个一组---
  217 + for (var i = 0; i < all_array.length; i += 3) {
  218 + arr.push(all_array.slice(i, i + 3));
  219 + }
  220 + }
  221 +
225 222 /*--熏染到前台--*/
226 223 console.log('秒杀数据:');
227 224 console.log(arr);
228 225 console.error('....................');
229   - th.setData({ goods_array: arr });
  226 + th.setData({ goods_array: arr });
  227 + if (th.data.object.style==6) {
  228 + th.setSwiper_h()
  229 + }
  230 +
230 231 });
231 232  
232 233  
... ... @@ -234,7 +235,32 @@ Component({
234 235 th.countDown2(th);
235 236 }, 1000);
236 237 },
237   -
  238 + setSwiper_h(){
  239 + var th=this
  240 + wx.createSelectorQuery().in(this).select('.swiper_h').boundingClientRect(rect => {
  241 + console.error('组件高度');
  242 + console.log(rect)
  243 + if (rect && rect.height) {
  244 + var sumHeigth=(rect.height+13)+'px'
  245 + th.setData({
  246 + swiperHeight: sumHeigth
  247 + })
  248 + }
  249 + }).exec();
  250 + // const query = this.createSelectorQuery()
  251 + // query.select('.swiper_h').boundingClientRect()
  252 + // query.exec( (res)=> {
  253 + // console.log(res)
  254 + // console.log(res[0].height)
  255 + // console.log(res[0].height * data.t.length)
  256 + // let sumHeigth = res[0].height * data.t.length;
  257 + // console.error('组件高度');
  258 + // console.log(sumHeigth);
  259 + // th.setData({
  260 + // swiperHeight: sumHeigth
  261 + // })
  262 + // })
  263 + },
238 264  
239 265  
240 266 //---小于10的格式化函数----
... ...
components/diy_seckill/diy_seckill.wxml
... ... @@ -26,15 +26,15 @@
26 26 <image class="imgBox_img" wx:if="{{object.subscript_style==5}}" src="{{object.subscript_diy_style}}"></image>
27 27 <image class="imgBox_img" wx:if="{{object.subscript_style<=4}}" src="{{imghost+'/miniapp/images/component/j0'+object.subscript_style +'.png'}}"></image>
28 28 </view>
29   - <view class="new_item1_time" wx:if="{{object.count_down}}">
  29 + <view style="height: 70rpx;" class="new_item1_time" wx:if="{{object.count_down}}">
30 30 <image src="{{imghost+'/miniapp/images/component/seckill.png'}}"></image>
31 31 <view style="text-align: center;">
32 32 <view>距结束时间</view>
33 33 <view>{{aitem.djs.day}}天{{aitem.djs.hou}}:{{aitem.djs.min}}:{{aitem.djs.sec}}</view>
34 34 </view>
35 35 </view>
36   - <view class="ellipsis-2 new_item1_goods_name" style="{{(object.text_style==2 ? 'font-weight: bold;':'') + (object.text_align==2 ? 'text-align:center;' :'' )}}" wx:if="{{object.trade_name}}">{{aitem.goods_name}}</view>
37   - <view class="new_item1_price" style="{{(object.text_align==2 ? 'justify-content:center;flex-direction:column;' :'' )}}">
  36 + <view class="ellipsis-2 new_item1_goods_name" style="{{'padding:10rpx;'+(object.text_style==2 ? 'font-weight: bold;':'') + (object.text_align==2 ? 'text-align:center;' :'' )}}" wx:if="{{object.trade_name}}">{{aitem.goods_name}}</view>
  37 + <view class="new_item1_price" style="{{'padding:0 10rpx;'+(object.text_align==2 ? 'justify-content:center;flex-direction:column;' :'' )}}">
38 38 <view style="{{(object.text_style==2 ? 'font-weight: bold;':'')}}">
39 39 <view class="flex" style="{{'font-size: 28rpx; ' +(object.text_align==2 ? 'justify-content:center;' :'' ) }}">
40 40 <view class="clor" style="margin-right: 5rpx;" wx:if="{{object.commodity_price}}">¥<text style="font-size:42rpx;">{{aitem.price}}</text></view>
... ... @@ -59,13 +59,13 @@
59 59 <block wx:if="{{object.style==2}}">
60 60 <view style="{{'padding-left:'+object.page_margins+'px;padding-right:'+object.page_margins+'px;'}}" class="{{'flex2 new_item1_box '+ ((object.product_style==1 || object.product_style==3 )? ' bgf ':'')}}">
61 61 <block wx:for="{{goods_array}}">
62   - <view wx:for="{{item}}" wx:for-item="aitem" wx:for-index="aind" class="{{'new_item1 ' + (object.product_style==2 ? ' boxsha ':'') + (object.product_style==3 ? ' aborder ':'') + (object.chamfer_of_main_drawing==2 ? ' but_radius5 ':'') + ((object.product_style==1 || object.product_style==3 )? ' bgf ':'')}}" style="{{'margin-bottom:'+object.product_spacing+'px; '+('width:calc(100%/2 - ' + object.product_spacing/2+'px)')}}">
  62 + <view wx:for="{{item}}" wx:for-item="aitem" wx:for-index="aind" class="{{'boxpad new_item1 ' + (object.product_style==2 ? ' boxsha ':'') + (object.product_style==3 ? ' aborder ':'') + ((object.product_style==1 || object.product_style==3 )? ' bgf ':'')}}" style="{{'margin-bottom:'+object.product_spacing+'px; '+('width:calc(100%/2 - ' + object.product_spacing/2+'px)')}}">
63 63 <navigator url="{{aitem.goods_type == 1 ? ('/packageA/pages/goodsInfo/goodsInfo?goods_id=' + aitem.goods_id + '&title=' + aitem.goods_name + '&prom_type=1&prom_id=' + aitem.id ) : ('/pages/goods/goodsInfo/goodsInfo?goods_id=' + aitem.goods_id + '&title=' + aitem.goods_name + '&prom_type=1&prom_id=' + aitem.id)}}" class="s1_gk_a1">
64 64 <view class="imgBox">
65 65 <!-- <image mode="{{object.picture_fill==1 ? 'aspectFill' : 'scaleToFill'}}" class="{{'new_item1_image '+ 'aspect_ratio'+object.picture_scale}}" style="{{'width:'+img_width+';height:'+img_height}}" src="{{imghost+aitem.original_img}}" data-errorimg="goods_array[{{index}}][{{aind}}].original_img" binderror="bind_bnerr3"></image> -->
66 66 <view class="{{'container'+object.picture_scale}}" style="{{object.picture_fill==1 ? 'background-color: #fff;' : ''}}">
67 67 <!-- <image mode="{{object.picture_fill==1 ? 'aspectFit' : 'aspectFill'}}" class="{{'new_item1_image images1'}}" src="{{imghost+aitem.original_img}}" data-errorimg="goods_array[{{index}}][{{aind}}].original_img" binderror="bind_bnerr3"></image> -->
68   - <image mode="{{object.picture_fill==1 ? 'aspectFit' : 'aspectFill'}}" class="{{'new_item1_image images1'}}" src="./t1.png" data-errorimg="goods_array[{{index}}][{{aind}}].original_img" binderror="bind_bnerr3"></image>
  68 + <image mode="{{object.picture_fill==1 ? 'aspectFit' : 'aspectFill'}}" class="{{'new_item1_image images1 '+ (object.chamfer_of_main_drawing==2 ? ' but_radius5 ':'') }}" src="./t1.png" data-errorimg="goods_array[{{index}}][{{aind}}].original_img" binderror="bind_bnerr3"></image>
69 69 </view>
70 70  
71 71 <image class="imgBox_img" wx:if="{{object.subscript_style==5}}" src="{{object.subscript_diy_style}}"></image>
... ... @@ -104,13 +104,13 @@
104 104 <block wx:if="{{object.style==3}}">
105 105 <view style="{{'padding-left:'+object.page_margins+'px;padding-right:'+object.page_margins+'px;'}}" class="{{'flex2 new_item1_box '+ ((object.product_style==1 || object.product_style==3 )? ' bgf ':'')}}">
106 106 <block wx:for="{{goods_array}}">
107   - <view wx:for="{{item}}" wx:for-item="aitem" wx:for-index="aind" class="{{'new_item1 ' + (object.product_style==2 ? ' boxsha ':'') + (object.product_style==3 ? ' aborder ':'') + (object.chamfer_of_main_drawing==2 ? ' but_radius5 ':'') + ((object.product_style==1 || object.product_style==3 )? ' bgf ':'')}}" style="{{'margin-bottom:'+object.product_spacing+'px; '+('width:calc(100%/3 - ' + (object.product_spacing*2)/3+'px)')}}">
  107 + <view wx:for="{{item}}" wx:for-item="aitem" wx:for-index="aind" class="{{'boxpad new_item1 ' + (object.product_style==2 ? ' boxsha ':'') + (object.product_style==3 ? ' aborder ':'') + ((object.product_style==1 || object.product_style==3 )? ' bgf ':'')}}" style="{{'margin-bottom:'+object.product_spacing+'px; '+('width:calc(100%/3 - ' + (object.product_spacing*2)/3+'px)')}}">
108 108 <navigator url="{{aitem.goods_type == 1 ? ('/packageA/pages/goodsInfo/goodsInfo?goods_id=' + aitem.goods_id + '&title=' + aitem.goods_name + '&prom_type=1&prom_id=' + aitem.id ) : ('/pages/goods/goodsInfo/goodsInfo?goods_id=' + aitem.goods_id + '&title=' + aitem.goods_name + '&prom_type=1&prom_id=' + aitem.id)}}" class="s1_gk_a1">
109 109 <view class="imgBox">
110 110 <!-- <image mode="{{object.picture_fill==1 ? 'aspectFill' : 'scaleToFill'}}" class="{{'new_item1_image '+ 'aspect_ratio'+object.picture_scale}}" style="{{'width:'+img_width+';height:'+img_height}}" src="{{imghost+aitem.original_img}}" data-errorimg="goods_array[{{index}}][{{aind}}].original_img" binderror="bind_bnerr3"></image> -->
111 111 <view class="{{'container'+object.picture_scale}}" style="{{object.picture_fill==1 ? 'background-color: #fff;' : ''}}">
112 112 <!-- <image mode="{{object.picture_fill==1 ? 'aspectFit' : 'aspectFill'}}" class="{{'new_item1_image images1'}}" src="{{imghost+aitem.original_img}}" data-errorimg="goods_array[{{index}}][{{aind}}].original_img" binderror="bind_bnerr3"></image> -->
113   - <image mode="{{object.picture_fill==1 ? 'aspectFit' : 'aspectFill'}}" class="{{'new_item1_image images1'}}" src="./t1.png" data-errorimg="goods_array[{{index}}][{{aind}}].original_img" binderror="bind_bnerr3"></image>
  113 + <image mode="{{object.picture_fill==1 ? 'aspectFit' : 'aspectFill'}}" class="{{'new_item1_image images1 '+ (object.chamfer_of_main_drawing==2 ? ' but_radius5 ':'') }}" src="./t1.png" data-errorimg="goods_array[{{index}}][{{aind}}].original_img" binderror="bind_bnerr3"></image>
114 114 </view>
115 115  
116 116 <image class="imgBox_img" wx:if="{{object.subscript_style==5}}" src="{{object.subscript_diy_style}}"></image>
... ... @@ -149,14 +149,14 @@
149 149 <block wx:if="{{object.style==4}}">
150 150 <view style="{{'padding-left:'+object.page_margins+'px;padding-right:'+object.page_margins+'px;'}}" class="{{'flex2 new_item1_box '+ ((object.product_style==1 || object.product_style==3 )? ' bgf ':'')}}">
151 151 <block wx:for="{{goods_array}}">
152   - <view wx:for="{{item}}" wx:for-item="aitem" wx:for-index="aind" class="{{'new_item1 ' + (object.product_style==2 ? ' boxsha ':'') + (object.product_style==3 ? ' aborder ':'') + (object.chamfer_of_main_drawing==2 ? ' but_radius5 ':'') + ((object.product_style==1 || object.product_style==3 )? ' bgf ':'')}}" style="{{'margin-bottom:'+object.product_spacing+'px;'}}">
  152 + <view wx:for="{{item}}" wx:for-item="aitem" wx:for-index="aind" class="{{'boxpad new_item1 ' + (object.product_style==2 ? ' boxsha ':'') + (object.product_style==3 ? ' aborder ':'') + ((object.product_style==1 || object.product_style==3 )? ' bgf ':'')}}" style="{{'border-top-right-radius:0;margin-bottom:'+object.product_spacing+'px;'}}">
153 153 <navigator style="display: flex;" url="{{aitem.goods_type == 1 ? ('/packageA/pages/goodsInfo/goodsInfo?goods_id=' + aitem.goods_id + '&title=' + aitem.goods_name + '&prom_type=1&prom_id=' + aitem.id ) : ('/pages/goods/goodsInfo/goodsInfo?goods_id=' + aitem.goods_id + '&title=' + aitem.goods_name + '&prom_type=1&prom_id=' + aitem.id)}}" class="s1_gk_a1">
154 154 <view style="width: 50%;">
155 155 <view class="imgBox">
156 156 <!-- <image mode="{{object.picture_fill==1 ? 'aspectFill' : 'scaleToFill'}}" class="{{'new_item1_image '+ 'aspect_ratio'+object.picture_scale}}" style="{{'width:'+img_width+';height:'+img_height}}" src="{{imghost+aitem.original_img}}" data-errorimg="goods_array[{{index}}][{{aind}}].original_img" binderror="bind_bnerr3"></image> -->
157 157 <view class="{{'container'+object.picture_scale}}" style="{{object.picture_fill==1 ? 'background-color: #fff;' : ''}}">
158 158 <!-- <image mode="{{object.picture_fill==1 ? 'aspectFit' : 'aspectFill'}}" class="{{'new_item1_image images1'}}" src="{{imghost+aitem.original_img}}" data-errorimg="goods_array[{{index}}][{{aind}}].original_img" binderror="bind_bnerr3"></image> -->
159   - <image mode="{{object.picture_fill==1 ? 'aspectFit' : 'aspectFill'}}" class="{{'new_item1_image images1'}}" src="./t1.png" data-errorimg="goods_array[{{index}}][{{aind}}].original_img" binderror="bind_bnerr3"></image>
  159 + <image mode="{{object.picture_fill==1 ? 'aspectFit' : 'aspectFill'}}" class="{{'new_item1_image images1'+ (object.chamfer_of_main_drawing==2 ? ' but_radius5 ':'') }}" src="./t1.png" data-errorimg="goods_array[{{index}}][{{aind}}].original_img" binderror="bind_bnerr3"></image>
160 160 </view>
161 161  
162 162 <image class="imgBox_img" wx:if="{{object.subscript_style==5}}" src="{{object.subscript_diy_style}}"></image>
... ... @@ -211,15 +211,15 @@
211 211 <image class="imgBox_img" wx:if="{{object.subscript_style==5}}" src="{{object.subscript_diy_style}}"></image>
212 212 <image class="imgBox_img" wx:if="{{object.subscript_style<=4}}" src="{{imghost+'/miniapp/images/component/j0'+object.subscript_style +'.png'}}"></image>
213 213 </view>
214   - <view class="new_item1_time" wx:if="{{object.count_down}}">
  214 + <view style="height: 70rpx;" class="new_item1_time" wx:if="{{object.count_down}}">
215 215 <image src="{{imghost+'/miniapp/images/component/seckill.png'}}"></image>
216 216 <view style="text-align: center;">
217 217 <view>距结束时间</view>
218 218 <view>{{aitem.djs.day}}天{{aitem.djs.hou}}:{{aitem.djs.min}}:{{aitem.djs.sec}}</view>
219 219 </view>
220 220 </view>
221   - <view class="ellipsis-2 new_item1_goods_name" style="{{(object.text_style==2 ? 'font-weight: bold;':'') + (object.text_align==2 ? 'text-align:center;' :'' )}}" wx:if="{{object.trade_name}}">{{aitem.goods_name}}</view>
222   - <view class="new_item1_price" style="{{(object.text_align==2 ? 'justify-content:center;flex-direction:column;' :'' )}}">
  221 + <view class="ellipsis-2 new_item1_goods_name" style="{{'padding:10rpx;'+(object.text_style==2 ? 'font-weight: bold;':'') + (object.text_align==2 ? 'text-align:center;' :'' )}}" wx:if="{{object.trade_name}}">{{aitem.goods_name}}</view>
  222 + <view class="new_item1_price" style="{{'padding:0 10rpx;'+(object.text_align==2 ? 'justify-content:center;flex-direction:column;' :'' )}}">
223 223 <view style="{{(object.text_style==2 ? 'font-weight: bold;':'')}}">
224 224 <view class="flex" style="{{'font-size: 28rpx; ' +(object.text_align==2 ? 'justify-content:center;' :'' ) }}">
225 225 <view class="clor" style="margin-right: 5rpx;" wx:if="{{object.commodity_price}}">¥<text style="font-size:42rpx;">{{aitem.price}}</text></view>
... ... @@ -237,13 +237,13 @@
237 237 </view>
238 238 </navigator>
239 239 </view>
240   - <view wx:if="{{aind==1}}" class="{{'new_item1 ' + (object.product_style==2 ? ' boxsha ':'') + (object.product_style==3 ? ' aborder ':'') + (object.chamfer_of_main_drawing==2 ? ' but_radius5 ':'') + ((object.product_style==1 || object.product_style==3 )? ' bgf ':'')}}" style="{{'margin-bottom:'+object.product_spacing+'px; '+('width:calc(100%/2 - ' + object.product_spacing/2+'px)')}}">
  240 + <view wx:if="{{aind==1}}" class="{{'boxpad new_item1 ' + (object.product_style==2 ? ' boxsha ':'') + (object.product_style==3 ? ' aborder ':'') + ((object.product_style==1 || object.product_style==3 )? ' bgf ':'')}}" style="{{'margin-bottom:'+object.product_spacing+'px; '+('width:calc(100%/2 - ' + object.product_spacing/2+'px)')}}">
241 241 <navigator url="{{aitem.goods_type == 1 ? ('/packageA/pages/goodsInfo/goodsInfo?goods_id=' + aitem.goods_id + '&title=' + aitem.goods_name + '&prom_type=1&prom_id=' + aitem.id ) : ('/pages/goods/goodsInfo/goodsInfo?goods_id=' + aitem.goods_id + '&title=' + aitem.goods_name + '&prom_type=1&prom_id=' + aitem.id)}}" class="s1_gk_a1">
242 242 <view class="imgBox">
243 243 <!-- <image mode="{{object.picture_fill==1 ? 'aspectFill' : 'scaleToFill'}}" class="{{'new_item1_image '+ 'aspect_ratio'+object.picture_scale}}" style="{{'width:'+img_width+';height:'+img_height}}" src="{{imghost+aitem.original_img}}" data-errorimg="goods_array[{{index}}][{{aind}}].original_img" binderror="bind_bnerr3"></image> -->
244 244 <view class="{{'container'+object.picture_scale}}" style="{{object.picture_fill==1 ? 'background-color: #fff;' : ''}}">
245 245 <!-- <image mode="{{object.picture_fill==1 ? 'aspectFit' : 'aspectFill'}}" class="{{'new_item1_image images1'}}" src="{{imghost+aitem.original_img}}" data-errorimg="goods_array[{{index}}][{{aind}}].original_img" binderror="bind_bnerr3"></image> -->
246   - <image mode="{{object.picture_fill==1 ? 'aspectFit' : 'aspectFill'}}" class="{{'new_item1_image images1'}}" src="./t1.png" data-errorimg="goods_array[{{index}}][{{aind}}].original_img" binderror="bind_bnerr3"></image>
  246 + <image mode="{{object.picture_fill==1 ? 'aspectFit' : 'aspectFill'}}" class="{{'new_item1_image images1 ' + (object.chamfer_of_main_drawing==2 ? ' but_radius5 ':'') }}" src="./t1.png" data-errorimg="goods_array[{{index}}][{{aind}}].original_img" binderror="bind_bnerr3"></image>
247 247 </view>
248 248  
249 249 <image class="imgBox_img" wx:if="{{object.subscript_style==5}}" src="{{object.subscript_diy_style}}"></image>
... ... @@ -275,13 +275,13 @@
275 275 </view>
276 276 </navigator>
277 277 </view>
278   - <view wx:if="{{aind==2}}" class="{{'new_item1 ' + (object.product_style==2 ? ' boxsha ':'') + (object.product_style==3 ? ' aborder ':'') + (object.chamfer_of_main_drawing==2 ? ' but_radius5 ':'') + ((object.product_style==1 || object.product_style==3 )? ' bgf ':'')}}" style="{{'margin-bottom:'+object.product_spacing+'px; '+('width:calc(100%/2 - ' + object.product_spacing/2+'px)')}}">
  278 + <view wx:if="{{aind==2}}" class="{{'boxpad new_item1 ' + (object.product_style==2 ? ' boxsha ':'') + (object.product_style==3 ? ' aborder ':'') + ((object.product_style==1 || object.product_style==3 )? ' bgf ':'')}}" style="{{'margin-bottom:'+object.product_spacing+'px; '+('width:calc(100%/2 - ' + object.product_spacing/2+'px)')}}">
279 279 <navigator url="{{aitem.goods_type == 1 ? ('/packageA/pages/goodsInfo/goodsInfo?goods_id=' + aitem.goods_id + '&title=' + aitem.goods_name + '&prom_type=1&prom_id=' + aitem.id ) : ('/pages/goods/goodsInfo/goodsInfo?goods_id=' + aitem.goods_id + '&title=' + aitem.goods_name + '&prom_type=1&prom_id=' + aitem.id)}}" class="s1_gk_a1">
280 280 <view class="imgBox">
281 281 <!-- <image mode="{{object.picture_fill==1 ? 'aspectFill' : 'scaleToFill'}}" class="{{'new_item1_image '+ 'aspect_ratio'+object.picture_scale}}" style="{{'width:'+img_width+';height:'+img_height}}" src="{{imghost+aitem.original_img}}" data-errorimg="goods_array[{{index}}][{{aind}}].original_img" binderror="bind_bnerr3"></image> -->
282 282 <view class="{{'container'+object.picture_scale}}" style="{{object.picture_fill==1 ? 'background-color: #fff;' : ''}}">
283 283 <!-- <image mode="{{object.picture_fill==1 ? 'aspectFit' : 'aspectFill'}}" class="{{'new_item1_image images1'}}" src="{{imghost+aitem.original_img}}" data-errorimg="goods_array[{{index}}][{{aind}}].original_img" binderror="bind_bnerr3"></image> -->
284   - <image mode="{{object.picture_fill==1 ? 'aspectFit' : 'aspectFill'}}" class="{{'new_item1_image images1'}}" src="./t1.png" data-errorimg="goods_array[{{index}}][{{aind}}].original_img" binderror="bind_bnerr3"></image>
  284 + <image mode="{{object.picture_fill==1 ? 'aspectFit' : 'aspectFill'}}" class="{{'new_item1_image images1 ' + (object.chamfer_of_main_drawing==2 ? ' but_radius5 ':'') }}" src="./t1.png" data-errorimg="goods_array[{{index}}][{{aind}}].original_img" binderror="bind_bnerr3"></image>
285 285 </view>
286 286  
287 287 <image class="imgBox_img" wx:if="{{object.subscript_style==5}}" src="{{object.subscript_diy_style}}"></image>
... ... @@ -317,7 +317,54 @@
317 317 </block>
318 318 </view>
319 319 </block>
  320 + <!-- 横向滑动 -->
  321 + <block wx:if="{{object.style==6}}">
  322 + <!-- <swiper indicator-dots circular> -->
  323 + <swiper indicator-dots style="{{'padding-left:'+object.page_margins+'px;padding-right:'+object.page_margins+'px;'+(swiperHeight ? ('height:'+swiperHeight+';'):'' )}}" class="{{' new_item1_box '+ ((object.product_style==1 || object.product_style==3 )? ' bgf ':'')}}">
  324 + <swiper-item wx:for="{{goods_array}}" class="flex2" style="padding: 5rpx;">
  325 + <view wx:for="{{item}}" wx:for-item="aitem" wx:for-index="aind" class="{{'boxpad swiper_h new_item1 ' + (object.product_style==2 ? ' boxsha ':'') + (object.product_style==3 ? ' aborder ':'') + ((object.product_style==1 || object.product_style==3 )? ' bgf ':'')}}" style="{{'margin-bottom:'+object.product_spacing+'px; '+('width:calc(100%/2 - ' + object.product_spacing/2+'px)')}}">
  326 + <navigator url="{{aitem.goods_type == 1 ? ('/packageA/pages/goodsInfo/goodsInfo?goods_id=' + aitem.goods_id + '&title=' + aitem.goods_name + '&prom_type=1&prom_id=' + aitem.id ) : ('/pages/goods/goodsInfo/goodsInfo?goods_id=' + aitem.goods_id + '&title=' + aitem.goods_name + '&prom_type=1&prom_id=' + aitem.id)}}" class="s1_gk_a1">
  327 + <view class="imgBox">
  328 + <!-- <image mode="{{object.picture_fill==1 ? 'aspectFill' : 'scaleToFill'}}" class="{{'new_item1_image '+ 'aspect_ratio'+object.picture_scale}}" style="{{'width:'+img_width+';height:'+img_height}}" src="{{imghost+aitem.original_img}}" data-errorimg="goods_array[{{index}}][{{aind}}].original_img" binderror="bind_bnerr3"></image> -->
  329 + <view class="{{'container'+object.picture_scale}}" style="{{object.picture_fill==1 ? 'background-color: #fff;' : ''}}">
  330 + <!-- <image mode="{{object.picture_fill==1 ? 'aspectFit' : 'aspectFill'}}" class="{{'new_item1_image images1'}}" src="{{imghost+aitem.original_img}}" data-errorimg="goods_array[{{index}}][{{aind}}].original_img" binderror="bind_bnerr3"></image> -->
  331 + <image mode="{{object.picture_fill==1 ? 'aspectFit' : 'aspectFill'}}" class="{{'new_item1_image images1 ' + (object.chamfer_of_main_drawing==2 ? ' but_radius5 ':'') }}" src="./t1.png" data-errorimg="goods_array[{{index}}][{{aind}}].original_img" binderror="bind_bnerr3"></image>
  332 + </view>
  333 +
  334 + <image class="imgBox_img" wx:if="{{object.subscript_style==5}}" src="{{object.subscript_diy_style}}"></image>
  335 + <image class="imgBox_img" wx:if="{{object.subscript_style<=4}}" src="{{imghost+'/miniapp/images/component/j0'+object.subscript_style +'.png'}}"></image>
  336 + </view>
  337 + <view class="new_item1_time" wx:if="{{object.count_down}}" style="justify-content: center;">
  338 + <!-- <image src="{{imghost+'/miniapp/images/component/seckill.png'}}"></image> -->
  339 + <!-- <view style="text-align: center;">
  340 + <view>距结束时间</view> -->
  341 + <view>{{aitem.djs.day}}天{{aitem.djs.hou}}:{{aitem.djs.min}}:{{aitem.djs.sec}}</view>
  342 + <!-- </view> -->
  343 + </view>
  344 + <view class="ellipsis-2 new_item1_goods_name" style="{{(object.text_style==2 ? 'font-weight: bold;':'') + (object.text_align==2 ? 'text-align:center;' :'' )}}" wx:if="{{object.trade_name}}">{{aitem.goods_name}}</view>
  345 + <view wx:if="{{object.seconds_num || object.remaining_inventory}}" class="new_item1_price" style="{{'display:block;color: rgb(56, 56, 56); '+(object.text_align==2 ?'text-align:center;':'')+(object.text_style==2 ? 'font-weight: bold;':'')}}">
  346 + <text wx:if="{{object.seconds_num}}">已秒 <text class="clor">10</text>件</text>
  347 + <text wx:if="{{object.remaining_inventory}}">还剩余<text class="clor">20</text>件</text>
  348 + </view>
  349 + <view class="new_item1_price" style="{{(object.text_align==2 ? 'justify-content:center;flex-direction:column;' :'' )}}">
  350 + <view style="{{(object.text_style==2 ? 'font-weight: bold;':'')}}">
  351 + <view style="{{'font-size: 28rpx; ' +(object.text_align==2 ? 'justify-content:center;' :'' ) }}">
  352 + <view class="clor" style="margin-right: 5rpx;" wx:if="{{object.commodity_price}}">¥<text style="font-size:42rpx;">{{aitem.price}}</text></view>
  353 + <view wx:if="{{object.wholesale_price}}">¥{{aitem.market_price}}</view>
  354 + </view>
  355 + </view>
  356 + <view>
  357 + <image wx:if="{{object.purchase_button<=4}}" src="{{imghost+'/miniapp/images/component/0'+object.purchase_button+'.png'}}" style="width: 122rpx;height: 122rpx;"></image>
  358 + <view wx:if="{{ 5<=object.purchase_button && object.purchase_button<=8 }}" class="{{'new_item1_but ' + (object.purchase_button==5 ? 'new_item1_but1':'' )+ (object.purchase_button==7 ? 'new_item1_but2':'' )+ (object.purchase_button==8 ? 'new_item1_but3':'' ) }}">{{object.button_content}}</view>
  359 + </view>
  360 + </view>
  361 + </navigator>
  362 + </view>
  363 + </swiper-item>
  364 + </swiper>
  365 + <!-- </swiper> -->
320 366  
  367 + </block>
321 368  
322 369 </block>
323 370 <block wx:else>
... ... @@ -451,4 +498,5 @@
451 498 </view>
452 499 <view class='clear'></view>
453 500 </block>
454   -</block>
455 501 \ No newline at end of file
  502 +</block>
  503 +
... ...
components/diy_seckill/diy_seckill.wxss
... ... @@ -292,7 +292,7 @@ swiper {
292 292  
293 293  
294 294 .ellipsis-2 {
295   - height: 75rpx;
  295 + height: 97rpx;
296 296 overflow: hidden;
297 297 text-overflow: ellipsis;
298 298 display: -webkit-box;
... ... @@ -312,7 +312,7 @@ swiper {
312 312 max-height: 100%; */
313 313 }
314 314 .new_item1_time{
315   - height: 70rpx;
  315 + height: 60rpx;
316 316 background: rgba(196, 24, 45, 1);
317 317 color: #fff;
318 318 font-size: 25rpx;
... ... @@ -327,13 +327,14 @@ swiper {
327 327 height: 52rpx;
328 328 }
329 329 .new_item1_goods_name{
330   - padding: 10rpx;
  330 + padding: 10rpx 0rpx;
331 331 font-size: 26rpx;
332 332 width: 100%;
  333 + box-sizing: border-box;
333 334 }
334 335 .new_item1_price{
335 336 display: flex;
336   - padding: 0 10rpx;
  337 + /* padding: 0 10rpx; */
337 338 align-items: center;
338 339 justify-content: space-between;
339 340 font-size: 26rpx;
... ... @@ -389,7 +390,7 @@ swiper {
389 390 border-radius:289rpx;
390 391 }
391 392 .but_radius5{
392   - border-radius:17px;
  393 + border-radius:17px 17px 0 0;
393 394 }
394 395 .imgBox{
395 396 position: relative;
... ... @@ -400,6 +401,7 @@ swiper {
400 401 top: 22rpx;
401 402 width: 74rpx;
402 403 height: 70rpx;
  404 +
403 405 }
404 406  
405 407 .aspect_ratio1{
... ... @@ -459,4 +461,15 @@ swiper {
459 461 justify-content: space-between;
460 462 flex-wrap: wrap;
461 463 box-sizing: border-box;
462   -}
463 464 \ No newline at end of file
  465 +}
  466 +.flex2:after {
  467 + content: "";
  468 + width: 30%;
  469 + height: 0px;
  470 + visibility: hidden;
  471 + }
  472 +
  473 + .boxpad{
  474 + padding:11rpx 9rpx;
  475 + box-sizing: border-box;
  476 + }
464 477 \ No newline at end of file
... ...