<view class="supplier">
	<view class="search-box">
		<view class="search" catchtap="goToSearch">
			<icon class="iconfont icon-all_search_2" bindtap="searchConfirm"></icon>
			<input type="text" placeholder="搜索本店商品" model:value="{{ keyword }}" bindconfirm="searchConfirm" />
		</view>
		<view class="icon-a" wx:if="{{!customer_open}}">
			<icon class="iconfont icon-service"></icon>
			<button style="position:absolute;width:100%;height:100%;opacity:0;top: 0;right: 0;" open-type="contact" session-from="weapp"></button>
		</view>
		<view class="icon-a" bindtap="showPop" wx:if="{{customer_open}}">
			<icon class="iconfont icon-service"></icon>
		</view>
		<view class="icon-b" catchtap="toggleSlide">
			<icon class="iconfont icon-more"></icon>
		</view>
	</view>
	<view class="ul menu" wx:if="{{sliderShow}}">
		<view class="spare">
			<icon class="iconfont icon-spare"></icon>
		</view>
		<view class="li" data-type="route" data-url="home" catchtap="goToUrl">
			<icon class="iconfont icon-home"></icon>
			<view class="span">首页</view>
		</view>
		<view class="li" catchtap="goToUrl" data-type="route" data-url="orderlist">
			<icon class="iconfont icon-order"></icon>
			<view class="span">订单</view>
		</view>
		<view class="li" catchtap="goToUrl" data-type="route" data-url="member">
			<icon class="iconfont icon-my"></icon>
			<view class="span">我的</view>
		</view>
	</view>
	<view class="supplier-box">
		<view class="supplier-info">
			<view class="supplier_info_user">
				<view class="user-img">
					<image src="{{supplierInfo.logo}}" wx:if="{{supplierInfo.logo}}" />
					<icon wx:else class="iconfont icon-dianpu"></icon>
				</view>
				<view class="ul user-name">
					<view class="li">{{supplierInfo.store_name?supplierInfo.store_name:supplierInfo.username}}</view>
					<view class="li">商品数量：<text class="span">{{indexData.list_count}}</text></view>
				</view>
			</view>
			<view class="user-btn" bindtap="goToSuppliereInfo">查看信息</view>
		</view>
	</view>
	<view class="tabList">
		<view class="tabs {{tab == 0?'activeIn':''}}" data-key="0" catchtap="onChange">
			首页
			<view class="line" wx:if="{{tab == 0}}"></view>
		</view>
		<view class="tabs {{tab == 1?'activeIn':''}}" data-key="1" data-title="商品" catchtap="onChange">
			商品
			<view class="line" wx:if="{{tab == 1}}"></view>
		</view>
		<view class="tabs {{tab == 2?'activeIn':''}}" data-key="2" data-title="活动" catchtap="onChange">
			活动
			<view class="line" wx:if="{{tab == 2}}"></view>
		</view>
		<view class="tabs {{tab == 3?'activeIn':''}}" data-key="3" data-title="分类" catchtap="onChange">
			分类
			<view class="line" wx:if="{{tab == 3}}"></view>
		</view>
		<view class="tabs {{tab == 4?'activeIn':''}}" wx:if="{{roomdataBol&&roomdata.length>0}}" data-key="4" data-title="直播列表" catchtap="onChange" style="width: 140rpx;margin-right: 0;">
			直播列表
			<view class="line" wx:if="{{tab == 4}}" style="width: 140rpx;"></view>
		</view>
	</view>
	<!-- 首页 -->
	<view class="home-page" wx:if="{{tab == 0}}">
		<view class="banner" wx:if="{{(indexData.slide&&indexData.slide.length>0) || (indexData.advs && indexData.advs.length>0)}}">
			<view class="slide" style="width: 100%;height: 320rpx;" wx:if="{{indexData.slide&&indexData.slide.length>0}}">
				<swiper indicator-dots="{{false}}" autoplay="{{false}}" circular="{{true}}" indicator-active-color="#007aff" style="width: 100%;height: 320rpx;">
					<block wx:for="{{indexData.slide}}" wx:for-item="slide" wx:for-index="index" wx:key="index" data-url="{{slide.link}}" data-type="href" catchtap="goToUrl">
						<swiper-item>
							<image style="border-radius:10rpx;" src="{{slide.thumb}}" />
						</swiper-item>
					</block>
				</swiper>
			</view>

		</view>
		<view class="hot" wx:if="{{indexData.list_is_hot && indexData.list_is_hot.length>0}}">
			<view class="title">
				<image src="https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/SupplierShopTop.png"></image>
			</view>
			<view class="ruleHot">
				<block wx:for-item="item" wx:key="index" wx:for="{{indexData.list_is_hot}}">
					<view class="goods" data-id="{{item.id}}" catchtap="goToDetail">
						<view class="img">
							<image src="{{item.thumb}}" mode='aspectFill' />
						</view>
						<view class="ul info">
							<view class="li">{{item.title}}</view>
							<view class="li">
								<view class="span left">
									<text class="font">{{language['money']}}</text>{{
									item.vip_level_status && item.vip_level_status.status == 1 ? item.vip_level_status.word : (item.has_option == 1 && item.min_price ? item.min_price : item.price)}}
								</view>
								<!-- <view class="span right">
								<text class="font">{{language['money']}}</text>{{item.market_price}}
							</view> -->
							</view>
						</view>
					</view>
				</block>
				<view class="goodsHotMore" data-id="{{item.id}}" catchtap="goToMoreHot" wx:if="{{indexData.list_is_hot.length > 3}}">
					查看更多
				</view>
			</view>
			<!-- 广告 -->
			<view class="banner_adv" wx:if="{{indexData.advs && indexData.advs.length>0}}">
				<view class="li" wx:for="{{indexData.advs}}" wx:for-item="item" wx:key="index" data-url="{{item.link}}" data-type="href" catchtap="goToUrl">
					<image src="{{item.img}}" mode='aspectFill' />
				</view>
			</view>
		</view>
		<view class="rec" wx:if="{{indexData.list_is_recommand && indexData.list_is_recommand.length>0}}">
			<view class="title">
				<image src="https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/SupplierShopHot.png"></image>
			</view>
			<view class="goods-list">
				<activity arr="{{indexData.list_is_recommand}}" showMask="{{false}}"></activity>
				<text class="space">到底了~</text>
			</view>
		</view>
	</view>
	<!-- 商品 -->
	<block wx:if="{{tab == 1}}">
		<view class="sort_box">
			<view class="sort_a ul">
				<view class="li" bindtap="toggle" data-idx="{{5}}">
					<view class="left {{hascolor=='5'?'sel':''}}">
						综合
					</view>
					<view class="right">
						<text class="icon_up {{colorshow=='5_1'?'sel':''}}"></text>
						<text class="icon_down {{colorshow=='5_2'?'sel':''}}"></text>
					</view>
				</view>
			</view>
			<view class="sort_b ul">
				<view class="li" bindtap="toggle" data-idx="{{2}}">
					<view class="left {{hascolor=='2'?'sel':''}}">
						销量
					</view>
					<view class="right">
						<text class="icon_up {{colorshow=='2_1'?'sel':''}}"></text>
						<text class="icon_down {{colorshow=='2_2'?'sel':''}}"></text>
					</view>
				</view>
			</view>
			<view class="sort_c ul">
				<view class="li" bindtap="toggle" data-idx="{{3}}">
					<view class="left {{hascolor=='3'?'sel':''}}">
						价格
					</view>
					<view class="right">
						<text class="icon_up {{colorshow=='3_1'?'sel':''}}"></text>
						<text class="icon_down {{colorshow=='3_2'?'sel':''}}"></text>
					</view>
				</view>
			</view>
		</view>
		<view class="goods-box">
			<view class="goods-list_1">
				<activity arr="{{goodsArr}}" showMask="{{false}}"></activity>
			</view>
		</view>
		<view class="dimg" wx:if="{{good_page >= good_total_page}}">
			<image src="https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/no-more-product.png" />
		</view>
	</block>
	<!-- 活动 -->
	<view class="active" wx:if="{{tab == 2}}">
		<view class="goods-list_2">
			<activity arr="{{actGoodsArr}}" showMask="{{true}}"></activity>
		</view>
		<view class="dimg" wx:if="{{act_page >= act_total_page}}">
			<image src="https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/no-more-product.png" />
		</view>
	</view>
	<!-- 分类 -->
	<view class="classify" wx:if="{{tab == 3 && indexData.is_hidden_category == 0}}">
		<classify_view sid='{{id}}' cat_level='{{cat_level}}'></classify_view>
	</view>
	<!-- 直播 -->
	<view class="living_content" wx:if="{{tab == 4}}">
		<view class="living" catchtap="gopage" data-status="{{item.play_type}}" wx:for="{{roomdata}}" wx:key="*this" data-id="{{item.id}}" data-backid="{{item.back_id}}">
			<view class="bg">
				<image src="{{item.cover}}" mode='aspectFill' />
				<view class="content">
					<view class="live_top" wx:if="{{item.play_type==3}}">
						<view class="advance_left">
							<view class="left">预告</view>
						</view>
					</view>
					<view class="live_top" wx:if="{{item.play_type==1||item.play_type==2}}">
						<view class="live_top_left" wx:if="{{item.play_type==1}}">
							<view class="left">直播中</view>
							<view class="right">{{item.view_num}}观看</view>
						</view>
						<view class="seeding_left" wx:if="{{item.play_type==2}}">
							<view class="left">回放</view>
							<view class="right">{{item.view_num}}观看</view>
						</view>
						<view class="live_top_right">
							<view class="little_icon">
								<view class="iconfont icon-zb_goods"></view>
							</view>
							<view class="num" wx:if="{{item.goods_num}}">{{item.goods_num}}</view>
						</view>
					</view>
				</view>
				<view class="live_bottom">{{item.title}}</view>
			</view>
			<view class="bootom">
				<view class="left">
					<image src="{{item.avatar}}" mode='aspectFill' />
				</view>
				<view class="right">{{item.nickname}}</view>
			</view>
		</view>
	</view>
</view>
<van-popup custom-style="border-radius: 38rpx;" show="{{show1}}" overlay="{{true}}">
	<view class="pop-content">
		<view class="pop-top">
			<view class="left">
				<view class="wrap">
					<view>
						<view class="image" style="postion:relative">
							<image src="https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/kf_online_contect@2x.png"></image>
						</view>
						<view>在线联系</view>
						<button wx:if="{{cservice==''}}" open-type="contact" bindcontact="handleContact" style="postion:absolute;width:100%;height:80rpx;opacity:0;top:-140rpx;"></button>
						<button wx:if="{{cservice!=''}}" data-cservice="{{cservice}}" bindtap="gotoChat" style="postion:absolute;width:100%;height:80rpx;opacity:0;top:-140rpx;"></button>
					</view>
				</view>
			</view>
			<view style="display:flex;" wx:if="{{!service_mobile==''}}">
				<view class="line"></view>
			</view>
			<view class="right" wx:if="{{!service_mobile==''}}">
				<view class="wrap" bindtap="callPhone">
					<view>
						<view class="image">
							<image src="https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/kf_tel_contect@2x.png"></image>
						</view>
						<view>联系电话</view>
						<view style="margin-top:16rpx">{{service_mobile}}</view>
					</view>
				</view>
			</view>
		</view>
		<view class="pop-bottom" wx:if="{{!service_QRcode==''}}">
			<view class="image">
				<image src="{{service_QRcode}}"></image>
			</view>
		</view>
		<icon class="iconfont icon-close11" catchtap="closePop"></icon>
	</view>
</van-popup>
<shopfoot></shopfoot>


<!-- <wxs module="util">
	var inOf = function (val) {
		if (val) { return val * 1000 }
	};
	module.exports.inOf = inOf;
</wxs> -->