Commit 52f9981602cfc6b9dfab3d0d70f3c51f84eff7b3
1 parent
46fa7027
秒杀组件优化
Showing
4 changed files
with
40 additions
and
44 deletions
components/diy_seckill/diy_seckill.js
| ... | ... | @@ -202,7 +202,8 @@ Component({ |
| 202 | 202 | let item=all_array[i]; |
| 203 | 203 | if(newTime > item.end_time) { |
| 204 | 204 | all_array[i].status = 3; |
| 205 | - }; | |
| 205 | + }; | |
| 206 | + all_array[i].residue=all_array[i].goods_num*1 - all_array[i].buy_num*1 | |
| 206 | 207 | } |
| 207 | 208 | |
| 208 | 209 | var arr = new Array(); |
| ... | ... | @@ -220,9 +221,6 @@ Component({ |
| 220 | 221 | } |
| 221 | 222 | |
| 222 | 223 | /*--熏染到前台--*/ |
| 223 | - console.log('秒杀数据:'); | |
| 224 | - console.log(arr); | |
| 225 | - console.error('....................'); | |
| 226 | 224 | th.setData({ goods_array: arr }); |
| 227 | 225 | if (th.data.object.style==6) { |
| 228 | 226 | th.setSwiper_h() |
| ... | ... | @@ -238,8 +236,6 @@ Component({ |
| 238 | 236 | setSwiper_h(){ |
| 239 | 237 | var th=this |
| 240 | 238 | wx.createSelectorQuery().in(this).select('.swiper_h').boundingClientRect(rect => { |
| 241 | - console.error('组件高度'); | |
| 242 | - console.log(rect) | |
| 243 | 239 | if (rect && rect.height) { |
| 244 | 240 | var sumHeigth=(rect.height+13)+'px' |
| 245 | 241 | th.setData({ |
| ... | ... | @@ -328,11 +324,11 @@ Component({ |
| 328 | 324 | url: "/pages/activity/seckill_list/seckill_list" |
| 329 | 325 | }); |
| 330 | 326 | }, |
| 327 | + //加入购物车 | |
| 328 | + shoppingCart(){ | |
| 329 | + console.log('加入购物车'); | |
| 330 | + }, | |
| 331 | 331 | loadImg(g_id){ |
| 332 | - console.log('图片加载------'); | |
| 333 | - console.error('秒杀组件---------'); | |
| 334 | - console.error(g_id); | |
| 335 | - console.log('..................................'); | |
| 336 | 332 | if (g_id.style==1) { |
| 337 | 333 | let w='' |
| 338 | 334 | switch (g_id.picture_scale) { | ... | ... |
components/diy_seckill/diy_seckill.wxml
| ... | ... | @@ -20,7 +20,7 @@ |
| 20 | 20 | <!-- <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> --> |
| 21 | 21 | <view class="{{'container'+object.picture_scale}}" style="{{object.picture_fill==1 ? 'background-color: #fff;' : ''}}"> |
| 22 | 22 | <!-- <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> --> |
| 23 | - <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> | |
| 23 | + <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> | |
| 24 | 24 | </view> |
| 25 | 25 | |
| 26 | 26 | <image class="imgBox_img" wx:if="{{object.subscript_style==5}}" src="{{object.subscript_diy_style}}"></image> |
| ... | ... | @@ -41,12 +41,12 @@ |
| 41 | 41 | <view wx:if="{{object.wholesale_price}}">¥{{aitem.market_price}}</view> |
| 42 | 42 | </view> |
| 43 | 43 | <view style="color: rgb(56, 56, 56);"> |
| 44 | - <text wx:if="{{object.seconds_num}}">已秒 <text class="clor">10</text>件</text> | |
| 45 | - <text wx:if="{{object.remaining_inventory}}">还剩余<text class="clor">20</text>件</text> | |
| 44 | + <text wx:if="{{object.seconds_num}}">已秒 <text class="clor">{{aitem.buy_num}}</text>件</text> | |
| 45 | + <text wx:if="{{object.remaining_inventory}}">还剩余<text class="clor">{{aitem.residue}}</text>件</text> | |
| 46 | 46 | </view> |
| 47 | 47 | </view> |
| 48 | - <view> | |
| 49 | - <image wx:if="{{object.purchase_button<=4}}" src="{{imghost+'/miniapp/images/component/0'+object.purchase_button+'.png'}}" style="width: 122rpx;height: 122rpx;"></image> | |
| 48 | + <view > | |
| 49 | + <image wx:if="{{object.purchase_button<=4}}" src="{{imghost+'/miniapp/images/component/0'+object.purchase_button+'.png'}}" style="width: 100rpx;height: 100rpx;"></image> | |
| 50 | 50 | <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> |
| 51 | 51 | </view> |
| 52 | 52 | </view> |
| ... | ... | @@ -65,7 +65,7 @@ |
| 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 '+ (object.chamfer_of_main_drawing==2 ? ' but_radius5 ':'') }}" 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="{{imghost+aitem.original_img}}"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> |
| ... | ... | @@ -80,8 +80,8 @@ |
| 80 | 80 | </view> |
| 81 | 81 | <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> |
| 82 | 82 | <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;':'')}}"> |
| 83 | - <text wx:if="{{object.seconds_num}}">已秒 <text class="clor">10</text>件</text> | |
| 84 | - <text wx:if="{{object.remaining_inventory}}">还剩余<text class="clor">20</text>件</text> | |
| 83 | + <text wx:if="{{object.seconds_num}}">已秒 <text class="clor">{{aitem.buy_num}}</text>件</text> | |
| 84 | + <text wx:if="{{object.remaining_inventory}}">还剩余<text class="clor">{{aitem.residue}}</text>件</text> | |
| 85 | 85 | </view> |
| 86 | 86 | <view class="new_item1_price" style="{{(object.text_align==2 ? 'justify-content:center;flex-direction:column;' :'' )}}"> |
| 87 | 87 | <view style="{{(object.text_style==2 ? 'font-weight: bold;':'')}}"> |
| ... | ... | @@ -91,7 +91,7 @@ |
| 91 | 91 | </view> |
| 92 | 92 | </view> |
| 93 | 93 | <view> |
| 94 | - <image wx:if="{{object.purchase_button<=4}}" src="{{imghost+'/miniapp/images/component/0'+object.purchase_button+'.png'}}" style="width: 122rpx;height: 122rpx;"></image> | |
| 94 | + <image wx:if="{{object.purchase_button<=4}}" src="{{imghost+'/miniapp/images/component/0'+object.purchase_button+'.png'}}" style="width: 100rpx;height: 100rpx;"></image> | |
| 95 | 95 | <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> |
| 96 | 96 | </view> |
| 97 | 97 | </view> |
| ... | ... | @@ -110,7 +110,7 @@ |
| 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 '+ (object.chamfer_of_main_drawing==2 ? ' but_radius5 ':'') }}" 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="{{imghost+aitem.original_img}}"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> |
| ... | ... | @@ -125,8 +125,8 @@ |
| 125 | 125 | </view> |
| 126 | 126 | <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> |
| 127 | 127 | <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;':'')}}"> |
| 128 | - <text wx:if="{{object.seconds_num}}">已秒 <text class="clor">10</text>件</text> | |
| 129 | - <text wx:if="{{object.remaining_inventory}}">剩<text class="clor">20</text>件</text> | |
| 128 | + <text wx:if="{{object.seconds_num}}">已秒 <text class="clor">{{aitem.buy_num}}</text>件</text> | |
| 129 | + <text wx:if="{{object.remaining_inventory}}">剩<text class="clor">{{aitem.residue}}</text>件</text> | |
| 130 | 130 | </view> |
| 131 | 131 | <view class="new_item1_price" style="{{(object.text_align==2 ? 'justify-content:center;flex-direction:column;' :'' )}}"> |
| 132 | 132 | <view style="{{(object.text_style==2 ? 'font-weight: bold;':'')}}"> |
| ... | ... | @@ -136,7 +136,7 @@ |
| 136 | 136 | </view> |
| 137 | 137 | </view> |
| 138 | 138 | <view> |
| 139 | - <image wx:if="{{object.purchase_button<=4}}" src="{{imghost+'/miniapp/images/component/0'+object.purchase_button+'.png'}}" style="width: 70rpx;height: 70rpx;"></image> | |
| 139 | + <image wx:if="{{object.purchase_button<=4}}" src="{{imghost+'/miniapp/images/component/0'+object.purchase_button+'.png'}}" style="width: 60rpx;height: 60rpx;"></image> | |
| 140 | 140 | <view style="width: 90rpx;height: 50rpx;line-height: 50rpx;" 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> |
| 141 | 141 | </view> |
| 142 | 142 | </view> |
| ... | ... | @@ -156,7 +156,7 @@ |
| 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'+ (object.chamfer_of_main_drawing==2 ? ' but_radius5 ':'') }}" 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="{{imghost+aitem.original_img}}" 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> |
| ... | ... | @@ -173,8 +173,8 @@ |
| 173 | 173 | <view style="width: 50%;display: flex;flex-wrap: wrap;padding-left: 10rpx;"> |
| 174 | 174 | <view class="ellipsis-2 new_item1_goods_name" style="{{'font-size:28rpx;'+(object.text_style==2 ? 'font-weight: bold;':'') + (object.text_align==2 ? 'text-align:center;' :'' )}}" wx:if="{{object.trade_name}}">{{aitem.goods_name}}</view> |
| 175 | 175 | <view wx:if="{{object.seconds_num || object.remaining_inventory}}" class="new_item1_price" style="{{'font-size:28rpx;display:block;color: rgb(56, 56, 56); '+(object.text_align==2 ?'text-align:center;':'')+(object.text_style==2 ? 'font-weight: bold;':'')}}"> |
| 176 | - <text wx:if="{{object.seconds_num}}">已秒 <text class="clor">10</text>件</text> | |
| 177 | - <text wx:if="{{object.remaining_inventory}}">剩<text class="clor">20</text>件</text> | |
| 176 | + <text wx:if="{{object.seconds_num}}">已秒 <text class="clor">{{aitem.buy_num}}</text>件</text> | |
| 177 | + <text wx:if="{{object.remaining_inventory}}">剩<text class="clor">{{aitem.residue}}</text>件</text> | |
| 178 | 178 | </view> |
| 179 | 179 | <view class="new_item1_price" style="{{'width:100%;' + (object.text_align==2 ? 'justify-content:center;flex-direction:column;' :'' )}}"> |
| 180 | 180 | <view style="{{(object.text_style==2 ? 'font-weight: bold;':'')}}"> |
| ... | ... | @@ -205,7 +205,7 @@ |
| 205 | 205 | <!-- <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> --> |
| 206 | 206 | <view class="{{'container'+object.picture_scale}}" style="{{object.picture_fill==1 ? 'background-color: #fff;' : ''}}"> |
| 207 | 207 | <!-- <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> --> |
| 208 | - <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> | |
| 208 | + <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> | |
| 209 | 209 | </view> |
| 210 | 210 | |
| 211 | 211 | <image class="imgBox_img" wx:if="{{object.subscript_style==5}}" src="{{object.subscript_diy_style}}"></image> |
| ... | ... | @@ -226,12 +226,12 @@ |
| 226 | 226 | <view wx:if="{{object.wholesale_price}}">¥{{aitem.market_price}}</view> |
| 227 | 227 | </view> |
| 228 | 228 | <view style="color: rgb(56, 56, 56);"> |
| 229 | - <text wx:if="{{object.seconds_num}}">已秒 <text class="clor">10</text>件</text> | |
| 230 | - <text wx:if="{{object.remaining_inventory}}">还剩余<text class="clor">20</text>件</text> | |
| 229 | + <text wx:if="{{object.seconds_num}}">已秒 <text class="clor">{{aitem.buy_num}}</text>件</text> | |
| 230 | + <text wx:if="{{object.remaining_inventory}}">还剩余<text class="clor">{{aitem.residue}}</text>件</text> | |
| 231 | 231 | </view> |
| 232 | 232 | </view> |
| 233 | 233 | <view> |
| 234 | - <image wx:if="{{object.purchase_button<=4}}" src="{{imghost+'/miniapp/images/component/0'+object.purchase_button+'.png'}}" style="width: 122rpx;height: 122rpx;"></image> | |
| 234 | + <image wx:if="{{object.purchase_button<=4}}" src="{{imghost+'/miniapp/images/component/0'+object.purchase_button+'.png'}}" style="width: 100rpx;height: 100rpx;"></image> | |
| 235 | 235 | <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> |
| 236 | 236 | </view> |
| 237 | 237 | </view> |
| ... | ... | @@ -243,7 +243,7 @@ |
| 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 ' + (object.chamfer_of_main_drawing==2 ? ' but_radius5 ':'') }}" 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="{{imghost+aitem.original_img}}"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> |
| ... | ... | @@ -258,8 +258,8 @@ |
| 258 | 258 | </view> |
| 259 | 259 | <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> |
| 260 | 260 | <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;':'')}}"> |
| 261 | - <text wx:if="{{object.seconds_num}}">已秒 <text class="clor">10</text>件</text> | |
| 262 | - <text wx:if="{{object.remaining_inventory}}">还剩余<text class="clor">20</text>件</text> | |
| 261 | + <text wx:if="{{object.seconds_num}}">已秒 <text class="clor">{{aitem.buy_num}}</text>件</text> | |
| 262 | + <text wx:if="{{object.remaining_inventory}}">还剩余<text class="clor">{{aitem.residue}}</text>件</text> | |
| 263 | 263 | </view> |
| 264 | 264 | <view class="new_item1_price" style="{{(object.text_align==2 ? 'justify-content:center;flex-direction:column;' :'' )}}"> |
| 265 | 265 | <view style="{{(object.text_style==2 ? 'font-weight: bold;':'')}}"> |
| ... | ... | @@ -269,7 +269,7 @@ |
| 269 | 269 | </view> |
| 270 | 270 | </view> |
| 271 | 271 | <view> |
| 272 | - <image wx:if="{{object.purchase_button<=4}}" src="{{imghost+'/miniapp/images/component/0'+object.purchase_button+'.png'}}" style="width: 122rpx;height: 122rpx;"></image> | |
| 272 | + <image wx:if="{{object.purchase_button<=4}}" src="{{imghost+'/miniapp/images/component/0'+object.purchase_button+'.png'}}" style="width: 100rpx;height: 100rpx;"></image> | |
| 273 | 273 | <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> |
| 274 | 274 | </view> |
| 275 | 275 | </view> |
| ... | ... | @@ -281,7 +281,7 @@ |
| 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 ' + (object.chamfer_of_main_drawing==2 ? ' but_radius5 ':'') }}" 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="{{imghost+aitem.original_img}}"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> |
| ... | ... | @@ -296,8 +296,8 @@ |
| 296 | 296 | </view> |
| 297 | 297 | <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> |
| 298 | 298 | <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;':'')}}"> |
| 299 | - <text wx:if="{{object.seconds_num}}">已秒 <text class="clor">10</text>件</text> | |
| 300 | - <text wx:if="{{object.remaining_inventory}}">还剩余<text class="clor">20</text>件</text> | |
| 299 | + <text wx:if="{{object.seconds_num}}">已秒 <text class="clor">{{aitem.buy_num}}</text>件</text> | |
| 300 | + <text wx:if="{{object.remaining_inventory}}">还剩余<text class="clor">{{aitem.residue}}</text>件</text> | |
| 301 | 301 | </view> |
| 302 | 302 | <view class="new_item1_price" style="{{(object.text_align==2 ? 'justify-content:center;flex-direction:column;' :'' )}}"> |
| 303 | 303 | <view style="{{(object.text_style==2 ? 'font-weight: bold;':'')}}"> |
| ... | ... | @@ -307,7 +307,7 @@ |
| 307 | 307 | </view> |
| 308 | 308 | </view> |
| 309 | 309 | <view> |
| 310 | - <image wx:if="{{object.purchase_button<=4}}" src="{{imghost+'/miniapp/images/component/0'+object.purchase_button+'.png'}}" style="width: 122rpx;height: 122rpx;"></image> | |
| 310 | + <image wx:if="{{object.purchase_button<=4}}" src="{{imghost+'/miniapp/images/component/0'+object.purchase_button+'.png'}}" style="width: 100rpx;height: 100rpx;"></image> | |
| 311 | 311 | <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> |
| 312 | 312 | </view> |
| 313 | 313 | </view> |
| ... | ... | @@ -328,7 +328,7 @@ |
| 328 | 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 | 329 | <view class="{{'container'+object.picture_scale}}" style="{{object.picture_fill==1 ? 'background-color: #fff;' : ''}}"> |
| 330 | 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> | |
| 331 | + <image mode="{{object.picture_fill==1 ? 'aspectFit' : 'aspectFill'}}" class="{{'new_item1_image images1 ' + (object.chamfer_of_main_drawing==2 ? ' but_radius5 ':'') }}" src="{{imghost+aitem.original_img}}"data-errorimg="goods_array[{{index}}][{{aind}}].original_img" binderror="bind_bnerr3"></image> | |
| 332 | 332 | </view> |
| 333 | 333 | |
| 334 | 334 | <image class="imgBox_img" wx:if="{{object.subscript_style==5}}" src="{{object.subscript_diy_style}}"></image> |
| ... | ... | @@ -343,8 +343,8 @@ |
| 343 | 343 | </view> |
| 344 | 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 | 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> | |
| 346 | + <text wx:if="{{object.seconds_num}}">已秒 <text class="clor">{{aitem.buy_num}}</text>件</text> | |
| 347 | + <text wx:if="{{object.remaining_inventory}}">还剩余<text class="clor">{{aitem.residue}}</text>件</text> | |
| 348 | 348 | </view> |
| 349 | 349 | <view class="new_item1_price" style="{{(object.text_align==2 ? 'justify-content:center;flex-direction:column;' :'' )}}"> |
| 350 | 350 | <view style="{{(object.text_style==2 ? 'font-weight: bold;':'')}}"> |
| ... | ... | @@ -354,7 +354,7 @@ |
| 354 | 354 | </view> |
| 355 | 355 | </view> |
| 356 | 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> | |
| 357 | + <image wx:if="{{object.purchase_button<=4}}" src="{{imghost+'/miniapp/images/component/0'+object.purchase_button+'.png'}}" style="width: 100rpx;height: 100rpx;"></image> | |
| 358 | 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 | 359 | </view> |
| 360 | 360 | </view> | ... | ... |
pages/index/index/index.wxml
| ... | ... | @@ -480,7 +480,7 @@ |
| 480 | 480 | <pingd_buy object="{{item.content}}"></pingd_buy> |
| 481 | 481 | </block> |
| 482 | 482 | <!--秒杀--> |
| 483 | - <block wx:if="{{item.ename=='seckill'}}"> | |
| 483 | + <block wx:if="{{item.ename=='seckill' || item.ename=='seckillNew'}}"> | |
| 484 | 484 | <seckill object="{{item.content}}"></seckill> |
| 485 | 485 | </block> |
| 486 | 486 | <!--标题--> | ... | ... |
pages/template/index.wxml
| ... | ... | @@ -38,7 +38,7 @@ |
| 38 | 38 | <pingd_buy object="{{item.content}}"></pingd_buy> |
| 39 | 39 | </block> |
| 40 | 40 | <!--秒杀--> |
| 41 | - <block wx:if="{{item.ename=='seckill'}}"> | |
| 41 | + <block wx:if="{{item.ename=='seckill' || item.ename=='seckillNew'}}"> | |
| 42 | 42 | <seckill object="{{item.content}}"></seckill> |
| 43 | 43 | </block> |
| 44 | 44 | <!--标题--> | ... | ... |