<wxs module="filter" src="../../../../utils/filter.wxs"></wxs>
<wxs module="g_filter" src="g_filter.wxs"></wxs>
<view>
	<swiper class="swiper" circular="true" autoplay="true" indicator-dots="true" interval="2500" wx:if="{{ad_data}}" indicator-active-color="rgba(255,255,255,.8)">
	<!-- <swiper class="swiper" circular="true" autoplay="true" indicator-dots="true" interval="2500"> -->
		<block wx:for="{{ad_data}}">
			<swiper-item>
				<!-- <navigator url="{{item.ad_weapplink}}" class="s1_gk_a1" wx:if="{{g_filter.has_char(item.ad_weapplink,'plugin')>=0}}"> -->
				<navigator url="{{item.ad_weapplink}}" style="height: 100%;" hover-class="none" open-type="reLaunch">
					<image src="{{item.ad_code}}" class="img" bindload="imageLoad" data-index="{{index}}" mode="scaleToFill" lazy-load="true"/>
				</navigator>
			</swiper-item>
		</block>
	</swiper>
	<view class="tab-title" bindtap="clickTab">
		<view class="tab-title-item {{currentIndex == index ? 'active':''}}" wx:for="{{tabArr}}" data-index="{{index}}">{{item}}</view>
	</view>
	<view class="tab-content">
		
		<block wx:for="{{list.pageData}}">
			<view class="tab-item" bindtap="goto" data-id="{{item.id}}" data-title="{{item.act_name}}">
				<view class="img-container">
					<image wx:if="{{item.imageurl}}" src="{{imghost + item.imageurl}}" class="img" mode="aspectFit"></image>
					<text class="iconfont icon-zhuanpan" wx:else></text>
				</view>
				<view class="desc-container">
					<view class="">
						<!-- 标题 -->
						<view class="ellipsis-1x taj fs28">{{item.act_name}}</view>
						<!-- 时间 -->
						<view class="date pdt10 pdb20" wx:if="{{currentIndex == 0}}">活动时间：{{filter.format_time(item.begindate) + ' 至 ' + filter.format_time(item.enddate)}}</view>
						<view class="date pdt10 pdb20" wx:else>兑换时间：{{filter.format_time(item.begindate) + ' 至 ' + filter.format_time(item.enddate)}}</view>
					</view>
					<!-- 按钮 -->
					<view class="btn-container">
						<view class="btn red" wx:if="{{currentIndex == 0}}">立即参与</view>
						<view class="btn {{item.userlbtype == 1 ? 'red':'gray'}}" wx:else>{{g_filter.btnText(item.userlbtype)}}</view>
					</view>
				</view>
			</view>
		</block>
		
		
		
		<nodata nodataContainer="t-c" wx:if="{{list.pageData.length == 0}}"></nodata>
		<view class="noMore" hidden="{{!noMore}}" wx:if="{{list.pageData.length !== 0}}">—— 已经到底了 ——</view>
	</view>
</view>

<!-- 引入提示组件 -->
<warn id="warn"></warn>
<my_confirm id="my_confirm"></my_confirm>
