<!DOCTYPE html>
<html>
	{include file="head.html"}
	<style>
		.outline-none{
			outline: none;
		}
	</style>
	<body>
		<div class="header">
			<div class="header-back"></div>
			<div class="header-title">搜一下</div>
		</div>
		<div class="header-row"></div>
		<div class="main-body">
			
			
			<div id="app" style="display: none;" :class="'flex-col'">
				<div class="tabs-border-group">
					<div class="tabs-border">
						<div @click="setPage('product')" :class="{'tabs-border-active':page=='product'}" class="tabs-border-item">产品</div>
						<div @click="setPage('shop')" :class="{'tabs-border-active':page=='shop'}" class="tabs-border-item">商家</div>
					</div>
				</div>
				<div class="flex pd-5">
					<input class="input-flex-text bd-radius-10 outline-none" v-model="keyword" :value="keyword" id="keyword" />
					<div class="input-flex-btn w60" @click="search">搜一下</div>
				</div>
				<div class="mtlist" v-if="page=='product'">
					<div class="mtlist-item" v-for="(item,index) in pageData.list" :key="index">	 
						<div class="mtlist-item-bd">
							<a class="mtlist-imgbox pointer" @click="goProduct(item.shopid,item.id)">
								<image class="mtlist-img" :src="item.imgurl+'.small.jpg'"></image>
							</a>
							<div class="mtlist-item-pd">
								<div class="mtlist-item-money">
									<div class="flex flex-1 flex-ai-center">
										<div class="cl-money f12">￥</div>
										<div class="cl-money f22">{{item.price}}</div>
									</div>
									<div class="mtlist-item-money_num">月销{{item.buy_num}}件</div>
								</div>
								<div class="mtlist-title">{{item.title}}</div>
								 
							</div>
						</div>						
					</div>
				</div>
				<div v-if="page=='shop'">
					<div @click="goShop(item.shopid)" v-for="(item,index) in pageData.list" :key="index" class="flexlist-item">
						<img :src="item.imgurl+'.100x100.jpg'" class="flexlist-img bd-radius-50" />
						<div class="flex-1">
							<div class="flexlist-title">{{item.shopname}}</div>
							<sky-raty len="5" mod="2" readonly="1" :grade="item.raty_grade" label="评价"></sky-raty>
							<div class="flex" v-if="item.prolist">
								<div v-for="(p,pindex) in item.prolist" :key="pindex" class="mgr-5">
									<img :src="p.imgurl+'.100x100.jpg'" class="wh-60 mgb-5" />
									 
								</div>
							</div>
						</div>
						
						<div v-if="item.distance>0" class="cl3 f12">距您{{item.distance}}Km</div>
					</div>
				</div>
			</div>
			
		</div>
		 
		{include file="footer.html"}
		<script>
			var keyword="{$keyword}";
		</script>
		<script src="/plugin/dt-ui/raty.vue.js"></script>
		<script src="{$skins}b2b_search/index.js"></script>
	</body>
</html>
