<wxs module="g_filter" src="g_filter.wxs"></wxs>
<view class="container" style="background-color: {{ad_color?ad_color:'#e85f93'}};height: 100%;">
	<!-- 封面 -->
	<view class="banner-container" wx:if="{{imgAd}}">
		  <image class="img-block" src="{{url + imgAd}}"  binderror="onerror" data-errimg="imgAd"></image>
			<!-- <image class="img-block" src="../../../images/banner.jpg"  binderror="onerror" data-errimg="imgAd"></image> -->
	</view>
	<!-- 列表 -->
	<view>
		<!-- 标题 -->
		<view class="title flex" bindtap="onClickTab">
			<view class="t-item {{currentIndex == 0 ? 'active':''}}" data-index="0">待核销</view>
			<view class="t-item {{currentIndex == 1 ? 'active':''}}" data-index="1">已核销</view>
		</view>
		<!-- 内容 -->
		<view class="list">
			<!-- <scroll-view scroll-y> -->
				<block wx:for="{{list}}" >
					 <view class="l-item"  bindtap="goDetails" data-id="{{item.ID}}" >
						<!-- 上 -->
						<view class="{{currentIndex == 0 ? 'top flex':'flex'}}">
							<!-- 左 -->
							<!-- <view class="left">
								<image class="img-block"></image>
							</view> -->
							<!-- 右 -->
							<view class="right">
								<view class="fs28 ellipsis-2 txt-justify">{{item.ActName}}</view>
								<view>
									<view class="price fs24">零售价：￥{{item.PosPrice}}</view>
									<view class="date fs24">购买时间：{{item.BillDate}}</view>
								</view>
							</view>
						</view>
						<!-- 下 -->
						<view class="bottom" wx:if="{{currentIndex == 0}}" >
							<text wx:if="{{g_filter.is_acting(item.EndDate) || item.EndDate==''}}" 
							   catchtap="viewDetails" data-index="{{index}}"  class="btn" >立即使用</text>
							<text wx:else class="btn" style="background-color: #ccc;">已过期</text>
							<text  data-index="{{index}}"  class="btn details" >详情</text>
						</view>
						<view class="bottom" wx:if="{{currentIndex == 1}}" >
							<text  data-index="{{index}}"  class="btn" >已核销</text>
							<text  data-index="{{index}}"  class="btn details" >详情</text>
						</view>
						
					</view>	
				</block>	
			<!-- </scroll-view> -->
			
		   <view hidden="{{!noMore}}" class="no-more t-c" wx:if="{{list.length !== 0}}">- 已全部加载 -</view>									
		</view>
		
		<nodata nodataContainer="nodata" wx:if="{{list.length === 0}}">暂无数据</nodata>
		
	</view>
</view>

<qrcode id="qrcode" ></qrcode>