<!-- <wxs module="g_filter" src="g_filter.wxs"></wxs> -->
<view class="container" >
	<!-- 搜索框 -->
	<!-- <view class="search-container">
		<view class="input-container"><input bindinput="set_search_value" class="search" type="text" placeholder="请输入您想查找的商品信息"/></view>
		<view bindtap="search_data" class="btn-search">搜索</view>
	</view> -->
	<view wx:if="{{ad}}">
		<image src="{{ad.ad_code}}" mode="widthFix" bindload="imageLoad" style="width: 100%;height: auto" lazy-load="true"></image>		
	</view>
	<view wx:else class="banner-container flex">
		<image src="{{url}}/miniapp/images/integral/liwu.png?v=1" class="banner"></image>
		<view style="display: inline-block; padding-top: 72rpx;">
			 <view class="fs36">小积分大作为</view>
			 <view class="fs26" style="color: #999; margin-top: 20rpx;">积分抵用现金，积少成多</view>
		</view>
	</view>
		
	<!-- 列表 -->
	<view wx:if="{{isshow}}" class="list-container" style="{{ad?('height:'+con_heihgt+'px;'):''}}">
		<!-- 标题 -->
		<view class="title" >
			<block wx:for="{{tab}}">
				<view class="title-item {{currentIndex == (index+1) ? 'active' + (isUp?' active1':''):''}}" data-index="{{index+1}}" bindtap="clickTab">{{item}}</view>
			</block>

			<view catchtap="show_search" class="flex ai-center"  style="height:80rpx; width:80rpx">
				<text class="iconfont icon-search_fd" style="font-size:30rpx; " ></text>
			</view>

		</view>

		<view class="s_box" wx:if="{{search_ing}}" >
			<view class="pdh20 pdv10 flex ai_c jc_sb">
				<view class="input-box">
					<input class="input-search" name="word" placeholder="请输入商品关键字"
						   bindconfirm="submitSearch" bindinput="getInput" focus="{{focus}}" value="{{keyword}}"/>
					<text class="iconfont icon-guan" hidden="{{hiddenClear}}" catchtap="clearInput"></text>
				</view>
				<button catchtap="close_layer" class="btn"  hover-class="none">取消</button>
			</view>
		</view>

		<!-- <view> -->
			<scroll-view
			 class="list"
			 scroll-y="true"
			 bindscrolltolower="request_list_lower"
			 scroll-anchoring
			 refresher-enabled
			 refresher-triggered="{{triggered}}"
			 bindrefresherrefresh="onPullDownRefresh">
			
				<block wx:for="{{list2}}">
					<view class class="list-item" bindtap="viewItemDetails" data-index="{{index}}">
						<view class="img-container">
							<image
							src="{{url+item.original_img}}"
							style="width: 100%; height: 100%;"
							binderror="bind_bnerr2" lazy-load="true" 
							data-errorimg="list2[{{index}}].original_img"></image>
						</view>
						<view class="details">
							<view class="ellipsis-2 fs30 name">{{item.name}}</view>
							<view>
								<view class="red">
									<block wx:if="{{item.integral>0 || item.addmoney>0 }}">
										<text wx:if="{{item.integral>0}}">{{item.integral}}积分</text><text wx:if="{{item.integral>0 && item.addmoney>0}}"> +</text><text wx:if="{{item.addmoney>0}}">￥{{item.addmoney}}</text>
									</block>
									<block wx:else>
										<text>0积分 + ￥0</text>
									</block>					
								</view>
								<view class="pdt14 fs22 gray flex jc_sb">
									<view><text wx:if="{{item.price_show==1}}">￥{{item.shop_price}}</text></view>
									<block wx:if="{{item.buy_num+item.virtual>0}}">
									  <view>销量：{{item.buy_num+item.virtual}}</view>
									</block>
								</view>
							</view>
						</view>
					</view>
				</block>
							
				<!-- <view style="height: 1rpx;"></view>	 -->	
				<nodata wx:if="{{list2.length==0}}" nodataContainer="nodata">暂无数据</nodata>
				<view wx:if="{{is_no_more2}}" class="no-more t-c">- 已全部加载 -</view>
				<!-- <nodata nodataContainer="nodata">暂无数据</nodata>
				<view class="no-more t-c">- 已全部加载 -</view> -->
			</scroll-view>
		<!-- </view> -->
		
	</view>
</view>

