<wxs module="filters" src="../../utils/filter.wxs"></wxs>
<block wx:if="{{goods_array.length>0}}">
	<!-- 幸运购 -->
	<view class="pdh20 flex jc_sb ai-center bg-white" bindtap="go" data-url="/packageC/pages/luckyGo/luckyGo_activityList/luckyGo_activityList">
		<view><text class="iconfont icon-luck"></text>幸运购</view>
		<view class="arrow-r">
			<image src="{{imghost}}/miniapp/images/icon-arrowdown.png" lazy-load="true" class="img-block"></image>
		</view>
	</view>

	<!-- 单行滑动显示 -->
	<block wx:if="{{object.style==1}}">
		<!--商品展示-->
		<swiper indicator-active-color="#ED6064" indicator-dots="false" wx:if="{{object.style==1}}">
			<view 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 url="{{aitem.actLen == 0 ? '':('/packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo?goods_id=' + aitem.goods_id + '&prom_type=9&group_id=' + aitem.id)}}"
						 class="pd20 nav" hover-class="none" bindtap="{{aitem.actLen == 0 ? 'alert':''}}">
							<view class="">
								<view class="img-container row {{aitem.actLen == 0 ? 'active':''}}" data-content="{{aitem.group_num}}人团">
									<image class="img-block" src="{{imghost + aitem.original_img}}" data-val="{{aitem.original_img}}"
									 data-errorimg="goods_array[{{index}}][{{aind}}].original_img" binderror="bind_bnerr3" lazy-load="true"
									 lazy-load="true"></image>
								</view>
								<view class="flex fdc jc_sb f1 pdt20">

									<view class="ellipsis-2 name fs28 clearbadge">{{aitem.title}}</view>
									<view>
										<view class="flex ai-center" style="align-items: center;">
											<text class="rmb c-red">{{filters.price(aitem.group_price)}}</text>
											<view style="position: relative;top:-2rpx"  wx:if="{{is_retail_price}}"  class="del fs22 c-a pdl10 ~no_line_x"><text class="rmb">{{aitem.market_price}}</text></view>
										</view>
									</view>

								</view>
							</view>

						</navigator>
					</block>
				</swiper-item>
			</view>
		</swiper>
	</block>

	<!-- 单列显示 -->
	<block class="sp2" wx:if="{{object.style==2}}">
		<view class="list">
			<block wx:for="{{goods_array}}">
				<!-- goods_array的数据是这样子的： [Array(3), Array(3), Array(3), Array(1)] -->
				<!-- 3个成一组，这里我们默认让它显示goods_array[0],控制显示数量在3个以内 -->
				<block wx:if="{{index == 0}}">
					<block wx:for="{{item}}" wx:for-item="aitem" wx:for-index="aind">
						<view class="list-item" data-url="/packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo?goods_id={{aitem.goods_id}}&prom_type=9&group_id={{aitem.id}}" bindtap="{{aitem.actLen == 0 ? '':'go'}}">
							<view class="flex ai-center">
								<view class="img-container">
									<image class="img-block" src="{{imghost + aitem.original_img}}" data-val="{{aitem.original_img}}"
									 data-errorimg="goods_array[{{index}}][{{aind}}].original_img" binderror="bind_bnerr3" lazy-load="true"></image>
								</view>
								<view class="pdl20 flex fdc jc_sb f1">

									<view class="ellipsis-2 name fs28" data-content="{{aitem.group_num}}人团">{{aitem.title}}</view>
									<view>
										<view class="flex ai-center">
											<text class="rmb c-red">{{filters.price(aitem.group_price)}}</text>
<!--											<view class="del fs22 c-a pdl10"><text class="rmb">{{aitem.shop_price}}</text></view>-->
										</view>
										<view class="flex jc_sb">
											<progress class="pdr20 f1 progress" percent="{{filters.percent(aitem.num, aitem.group_num)}}" activeColor="#FF6768"
											 backgroundColor="#d0d0d0" border-radius="12" stroke-width="12" data-content="{{aitem.num}}人已参团"></progress>
											<view class="btn fs26 {{aitem.actLen == 0 ? 'gray':''}}" wx:if="{{aitem.actLen == 0}}">已抢光</view>
											<view class="btn fs26" wx:else>去参团</view>
										</view>
									</view>
								</view>
							</view>
							<view class="fs24 pdt10 c-7b">*<text class="c-red">{{aitem.group_num}}</text>人成团，<text class="c-red">{{aitem.group_win}}</text>人得商品，<text
								 class="c-red">{{aitem.group_num - aitem.group_win}}</text>人全额退款并得<text class="c-red">惊喜礼品</text>！</view>
						</view>
					</block>
				</block>
			</block>
		</view>
	</block>
</block>
