<wxs module="filters" src="../../../utils/filter.wxs"></wxs>
<view class="container">
	<!-- 列表 -->
	<!-- <view class="list-container"> -->
		<!-- 标题 -->
		<!-- <view class="subTab-title flex">
			<block wx:for="{{tab2}}">
				<view class="subTab-titleItem {{currentIndex2 == index ? 'active':''}}" data-index="{{index}}" bindtap="clickTab2">{{item}}</view>
			</block>
		</view> -->
		<!-- 列表项 -->
		<scroll-view
		 class="list"
		 scroll-y="true"
		 bindscrolltolower="refresh"
		 scroll-anchoring>
		 									
			<block wx:for="{{list}}">
				<view class="coupons bg-red" bindtap="go_quan" data-index="{{index}}">
					<view class="flex">
						<view>
							<view class="coupon-hd ellipsis-2 fs32">{{item.name}}</view>
							<view class="deadline fs28 pdt10" wx:if="{{item.endtype==0}}">限时使用：
							   <text wx:if="{{item.starttype==1}}">{{filters.format_time(getcurday+3600*24*item.startdays)}}</text>
							   <text wx:if="{{item.starttype==0 && item.use_start_time>0}}"> {{filters.format_time(item.use_start_time)}}</text>至
							   <text wx:if="{{item.use_end_time>0}}"> {{filters.format_time(item.use_end_time)}}</text><text wx:else>不限</text>
							</view>							
							<view class="deadline fs28 pdt10" wx:else>限时使用：
							   <text wx:if="{{item.starttype==1}}">{{filters.format_time(getcurday+3600*24*item.startdays)}}至</text> <text wx:if="{{item.days>0}}">{{filters.format_time(getcurday+3600*24*item.days)}}</text><text wx:else>不限</text>
							</view>				
						</view>
						<view class="price">￥<text class="fs40">{{filters.toFix(item.money,2)}}</text>  
					
						 <image wx:if="{{item.is_share==1}}"  src="{{imghost}}miniapp/images/coupon_img/sharelinke.png"  class="sharelink"></image>
				

						 </view>
						
					</view>
					<view class="flex ai-center jc_sb pdt20">
						<view wx:if="{{item.useobjecttype==0}}" class="coupon-ft ellipsis-2 fs28">全场任意产品通用</view>
						<view wx:if="{{item.useobjecttype==1}}" class="coupon-ft ellipsis-2 fs28">名牌({{item.useobjectname}})</view>
						<view wx:if="{{item.useobjecttype==2}}" class="coupon-ft ellipsis-2 fs28">品类({{item.useobjectname}})</view>
						<view wx:if="{{item.useobjecttype==11}}" class="coupon-ft ellipsis-2 fs28">用途({{item.useobjectname}})</view>
						<view wx:if="{{item.useobjecttype==12}}" class="coupon-ft ellipsis-2 fs28">分类一({{item.useobjectname}})</view>
						<view wx:if="{{item.useobjecttype==20}}" class="coupon-ft ellipsis-2 fs28">单品({{item.useobjectname}})</view>
												
						<view catchtap="share_index" data-index="{{index}}" class="btn-share" >分享</view>
					</view>
				</view>				
			</block>
		
		    <!-- 暂无数据 -->
		    <nodata wx:if="{{list.length==0}}"  nodataContainer="nodata">暂无数据</nodata>			
			<view  wx:if="{{is_no_more}}" class="no-more t-c">- 已全部加载 -</view>
		</scroll-view>
	<!-- </view> -->
	<view class="popup-container" hidden="{{hiddenPopup}}">
		<view class="popup" bindtap="select">
			<view class="popup-item bdr-b" hover-class="active" data-index="0">
				<image src="../../images/wx2.png" class="popup-img"></image>微信
			</view>
			<view class="popup-item" hover-class="active" data-index="1">
				<image src="../../images/qywx.png" class="popup-img h70"></image>企业微信
			</view>
		</view>
	</view>
</view>
<!-- 分享控件，底部弹出 -->
<share_button id="share_button" bind:cancel="cancel" bind:share_img="saveImageToPhotosAlbum"  wx:if="{{!share_hidden}}"></share_button>
