<wxs module="filter" src="../../utils/filter.wxs" ></wxs>
<block wx:if="{{goods_array.length>0}}">
	<!--秒杀-->
	<view class='top' bindtap="go_to_group">
		<view class="flex">
			<view class='t_left'></view>
			<view class='t_ms'>团购</view>
		</view>
		<view class='right_k'>
			<image src="{{imghost}}/miniapp/images/icon-arrowdown.png" lazy-load="true"></image>
		</view>
	</view>

	<!--商品展示-->
	<swiper class="s_prom" indicator-active-color='red' indicator-dots="false" wx:if="{{object.style==1}}">
		<view class='sp' wx:if="{{object.style==1}}">
			<swiper-item class="s_it" wx:for="{{goods_array}}">
				<block wx:for="{{item}}" wx:for-item="aitem" wx:for-index="aind">
					<navigator
					    bindtap="go_group_buy"
                        data-index="{{index}}"
                        data-idx="{{aind}}"
						class="s1_gk_a1">
						<view class='one'>
							<view class='sp_top'>
								<view class='s_img'>
									<image src="{{imghost+aitem.original_img}}"
										data-errorimg="goods_array[{{index}}][{{aind}}].original_img"
										binderror="bind_bnerr3"></image>
								</view>
								<view class='s_foot_kill'>
									<text>{{aitem.djs.day}}天</text>
									<text>{{aitem.djs.hou}}时</text>
									<text>{{aitem.djs.min}}分</text>
									<text>{{aitem.djs.sec}}秒</text>
								</view>
								<view class='clear' style="clear: both;"></view>

							</view>

							<view class='sp_wz'>
								<view class='sp_wzi'>{{aitem.goods_name}}</view>
								<view class='sp_jg'>￥{{aitem.price}}</view>
								<view wx:if="{{is_retail_price}}" class='sp_jgx ~no_line_x'>￥{{aitem.market_price}}</view>
							</view>
							<!-- <view class="progress_box">
								<text class="on_sale_list">已买:{{aitem.buy_num + aitem.virtual_num}}件</text>
								<progress class="progress_list" percent="{{((aitem.buy_num + aitem.virtual_num) / (aitem.goods_num + aitem.virtual_num))*100}}" border-radius="10" backgroundColor="#F1AAAB" activeColor="#E02E23" stroke-width="20" data-content="{{((aitem.buy_num + aitem.virtual_num) / (aitem.goods_num + aitem.virtual_num))*100}}%" />
							</view> -->
							<view class="progress_box">
								<text class="on_sale" style="left:6rpx;font-size: 20rpx;">已抢{{aitem.buy_num + aitem.virtual_num}}件</text>
								<progress class="progress_list" percent="{{((aitem.buy_num + aitem.virtual_num)/( aitem.goods_num + aitem.virtual_num))*100}}" border-radius="10" backgroundColor="#F1AAAB" activeColor="#E02E23" stroke-width="20" data-content="{{filter.toFix(((aitem.buy_num + aitem.virtual_num) / (aitem.goods_num + aitem.virtual_num))*100)}}%"/>
							</view>
							<!-- <view class="gorup_count">
								<text class="leftred">已抢{{}}件</text>
								<text class="rightwhite">0%</text>
							</view> -->
						</view>
					</navigator>
				</block>
			</swiper-item>
		</view>
	</swiper>

	<view class="sp2" wx:if="{{object.style==2}}">
		<block wx:for="{{goods_array}}">
			<block wx:for="{{item}}" wx:for-item="aitem" wx:for-index="aind">
				<navigator
					bindtap="go_group_buy"
					data-index="{{index}}"
					data-idx="{{aind}}"
					class="s1_gk_a1">
					<view class="flex jc_sb" style="padding: 0 20rpx; margin-top: 10rpx;">
						<view>
							距结束时间
						</view>
						<view class="o1_sj_kill">
							<text>{{aitem.djs.day}}</text> 天
							<text>{{aitem.djs.hou}}</text> :
							<text>{{aitem.djs.min}}</text> :
							<text>{{aitem.djs.sec}}</text>				
						</view>	
					</view>
					
					<view class='one1'>
						<view class="o1_img">
							<image src="{{imghost+aitem.original_img}}"
								data-errorimg="goods_array[{{index}}][{{aind}}].original_img" binderror="bind_bnerr3">
							</image>
						</view>

						<view class="o1_right">
							<view class="sp_wzi">{{aitem.title}}</view>
							<!-- 进度条 -->
						  <view class="progress_box">
								<text class="on_sale">已抢{{aitem.buy_num + aitem.virtual_num}}件</text>
								<progress class="progress" percent="{{((aitem.buy_num + aitem.virtual_num)/( aitem.goods_num + aitem.virtual_num))*100}}" border-radius="10" backgroundColor="#F1AAAB" activeColor="#E02E23" stroke-width="20" data-content="{{filter.toFix(((aitem.buy_num + aitem.virtual_num) / (aitem.goods_num + aitem.virtual_num))*100)}}%"/>
							</view>
							<view>
								<view class='sp_jg'>￥{{aitem.price}}</view>
								<view wx:if="{{is_retail_price}}" class='sp_jgx ~no_line_x'>￥{{aitem.market_price}}</view>
							</view>
						</view>
					</view>
				</navigator>
			</block>
		</block>

	</view>
	<view class='clear'></view>

</block>
