<!--packageI/newGroup/homeList/homeList.wxml-->

<view class="header">
	<view class="header_content">
		<view class="inputWrapper">
			<view class="input">
				<icon class="iconfont icon-all_search_2"></icon>
				<input placeholder="搜索商品" model:value="{{searchText}}" confirm-type="search" bindconfirm="onSearch"></input>
				<icon class="iconfont icon-guanbi" catchtap="clearSearch"></icon>
			</view>
		</view>
		<view class="explain" bindtap="setExplainFlag">活动说明</view>
	</view>
	<view class="brand">
		<swiper style='height:{{Height}}' class="my-swipe" autoplay="2000" wx:if="{{banner_list.length>0}}">
			<swiper-item wx:for="{{banner_list}}" catchtap='tapUrl' wx:key="index" data-url="{{item.applet_url}}">
				<image src="{{item.image}}" bindload='imgHeight' mode="aspectFill"></image>
			</swiper-item>
		</swiper>
	</view>
</view>

<van-tabs bind:change="setTabsIndex" active="{{ tabs_index }}" wx:if="{{tabs_list.length>0}}" swipe-threshold="4"
	ellipsis="{{false}}">
	<van-tab wx:for="{{tabs_list}}" title="{{item.title}}"></van-tab>
</van-tabs>

<view class="listItems">
	<view wx:if="{{networkLoading && listData.length > 0}}" class="listItem" wx:for="{{listData}}">
		<list-item item="{{item}}" bindclick="gotoUrl"></list-item>
	</view>

	<view wx:if="{{!networkLoading}}" class="loadingimg">
		<image src="https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/video-loading.gif" mode='aspectFill' />
	</view>

	<view wx:if="{{ networkLoading && listData.length==0}}" class="blank">
		<image src='https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/blank.png' mode='widthFix' />
	</view>

</view>

<van-popup custom-style="width: 680rpx;height:70vh; border-radius: 49rpx;" show="{{explainFlag}}"
	bind:close="setExplainFlag">
	<view class="explainWrapper">
		<view class="header">
			<view class="title">活动说明</view>
			<icon class="iconfont icon-guanbi" catchtap="setExplainFlag"></icon>
		</view>
		<view class="content">
			<mp-html content="{{explainText}}"></mp-html>
		</view>
	</view>
</van-popup>