<template>
	<div style="background-color: #f6f6f6;height: 100vh;padding-bottom: 90px;overflow: hidden;">
		<view style="padding:5px 10px;">
			<u-search placeholder="搜索品牌名称" :focus="false" :show-action="false" :clearabled="true" radius="40" v-model="searchKey"
			 @search="searchHandler" @custom="searchHandler" bg-color="#FFF" ></u-search>
		</view>
		<view style="display: flex; align-items: center;">
			<view style="flex:1;overflow: hidden;">
				<u-tabs bg-color="#f6f6f6" :is-scroll="true" name="Name" :list="typeList" :active-color="mainColor"
					:current="active" @change="changeHandler" :show-bar="true" :activeFontSize="34" :bold="true" height="100"
					duration="0" font-size="28"></u-tabs>
			</view>
			<div style="width: 64rpx;height: 48rpx;display: table-cell; vertical-align: middle;text-align: right;">
				<u-icon name="filter-o" color="#111" size="42"></u-icon>
			</div>
		</view>
		
		<view style="height: calc(100% - 101px);padding:2px 10px;">
			<scroll-view :scroll-y="true" :enable-back-to-top="true" :enable-flex="true"
				style="height: 100%; padding-bottom: 0px;">
				<u-row gutter="24">
					<u-col span="6">
						<view class="good_study_two" @click="openGood" :style="{borderRadius:'10px'}">
							<view class="img-box">
								<view class="img-show" :style="{'border-top-left-radius':'10px'}">
									<image style="
										  width: 100%;
										  height: 100%;
										"mode="aspectFill" src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1616398636000_706.png" />
								</view>
							</view>
							<view class="good-info">
								<view class="good-name">柴门荟</view>
								<view class="good-price-info">
									<span class="price">极致川味匠心的餐厅</span>
								</view>
							</view>
						</view>
					</u-col>
					<u-col span="6">
						<view class="good_study_two" @click="openGood" :style="{borderRadius:'10px'}">
							<view class="img-box">
								<view class="img-show" :style="{'border-top-left-radius':'10px'}">
									<image style="
										  width: 100%;
										  height: 100%;
										"mode="aspectFill" src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1616398636000_706.png" />
								</view>
							</view>
							<view class="good-info">
								<view class="good-name">柴门荟</view>
								<view class="good-price-info">
									<span class="price">极致川味匠心的餐厅</span>
								</view>
							</view>
						</view>
					</u-col>
					<u-col span="6">
						<view class="good_study_two" @click="openGood" :style="{borderRadius:'10px'}">
							<view class="img-box">
								<view class="img-show" :style="{'border-top-left-radius':'10px'}">
									<image style="
										  width: 100%;
										  height: 100%;
										"mode="aspectFill" src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1616398636000_706.png" />
								</view>
							</view>
							<view class="good-info">
								<view class="good-name">柴门荟</view>
								<view class="good-price-info">
									<span class="price">极致川味匠心的餐厅</span>
								</view>
							</view>
						</view>
					</u-col>
					<u-col span="6">
						<view class="good_study_two" @click="openGood" :style="{borderRadius:'10px'}">
							<view class="img-box">
								<view class="img-show" :style="{'border-top-left-radius':'10px'}">
									<image style="
										  width: 100%;
										  height: 100%;
										"mode="aspectFill" src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1616398636000_706.png" />
								</view>
							</view>
							<view class="good-info">
								<view class="good-name">柴门荟</view>
								<view class="good-price-info">
									<span class="price">极致川味匠心的餐厅</span>
								</view>
							</view>
						</view>
					</u-col>
					<u-col span="6">
						<view class="good_study_two" @click="openGood" :style="{borderRadius:'10px'}">
							<view class="img-box">
								<view class="img-show" :style="{'border-top-left-radius':'10px'}">
									<image style="
										  width: 100%;
										  height: 100%;
										"mode="aspectFill" src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1616398636000_706.png" />
								</view>
							</view>
							<view class="good-info">
								<view class="good-name">柴门荟</view>
								<view class="good-price-info">
									<span class="price">极致川味匠心的餐厅</span>
								</view>
							</view>
						</view>
					</u-col>
					<u-col span="6">
						<view class="good_study_two" @click="openGood" :style="{borderRadius:'10px'}">
							<view class="img-box">
								<view class="img-show" :style="{'border-top-left-radius':'10px'}">
									<image style="
										  width: 100%;
										  height: 100%;
										"mode="aspectFill" src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1616398636000_706.png" />
								</view>
							</view>
							<view class="good-info">
								<view class="good-name">柴门荟</view>
								<view class="good-price-info">
									<span class="price">极致川味匠心的餐厅</span>
								</view>
							</view>
						</view>
					</u-col>
					<u-col span="6">
						<view class="good_study_two" @click="openGood" :style="{borderRadius:'10px'}">
							<view class="img-box">
								<view class="img-show" :style="{'border-top-left-radius':'10px'}">
									<image style="
										  width: 100%;
										  height: 100%;
										"mode="aspectFill" src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1616398636000_706.png" />
								</view>
							</view>
							<view class="good-info">
								<view class="good-name">柴门荟</view>
								<view class="good-price-info">
									<span class="price">极致川味匠心的餐厅</span>
								</view>
							</view>
						</view>
					</u-col>
					<u-col span="6">
						<view class="good_study_two" @click="openGood" :style="{borderRadius:'10px'}">
							<view class="img-box">
								<view class="img-show" :style="{'border-top-left-radius':'10px'}">
									<image style="
										  width: 100%;
										  height: 100%;
										"mode="aspectFill" src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1616398636000_706.png" />
								</view>
							</view>
							<view class="good-info">
								<view class="good-name">柴门荟</view>
								<view class="good-price-info">
									<span class="price">极致川味匠心的餐厅</span>
								</view>
							</view>
						</view>
					</u-col>
					<u-col span="6">
						<view class="good_study_two" @click="openGood" :style="{borderRadius:'10px'}">
							<view class="img-box">
								<view class="img-show" :style="{'border-top-left-radius':'10px'}">
									<image style="
										  width: 100%;
										  height: 100%;
										"mode="aspectFill" src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1616398636000_706.png" />
								</view>
							</view>
							<view class="good-info">
								<view class="good-name">柴门荟</view>
								<view class="good-price-info">
									<span class="price">极致川味匠心的餐厅</span>
								</view>
							</view>
						</view>
					</u-col>
					<u-col span="6">
						<view class="good_study_two" @click="openGood" :style="{borderRadius:'10px'}">
							<view class="img-box">
								<view class="img-show" :style="{'border-top-left-radius':'10px'}">
									<image style="
										  width: 100%;
										  height: 100%;
										"mode="aspectFill" src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1616398636000_706.png" />
								</view>
							</view>
							<view class="good-info">
								<view class="good-name">柴门荟</view>
								<view class="good-price-info">
									<span class="price">极致川味匠心的餐厅</span>
								</view>
							</view>
						</view>
					</u-col>
					<u-col span="6">
						<view class="good_study_two" @click="openGood" :style="{borderRadius:'10px'}">
							<view class="img-box">
								<view class="img-show" :style="{'border-top-left-radius':'10px'}">
									<image style="
										  width: 100%;
										  height: 100%;
										"mode="aspectFill" src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1616398636000_706.png" />
								</view>
							</view>
							<view class="good-info">
								<view class="good-name">柴门荟</view>
								<view class="good-price-info">
									<span class="price">极致川味匠心的餐厅</span>
								</view>
							</view>
						</view>
					</u-col>
					<u-col span="6">
						<view class="good_study_two" @click="openGood" :style="{borderRadius:'10px'}">
							<view class="img-box">
								<view class="img-show" :style="{'border-top-left-radius':'10px'}">
									<image style="
										  width: 100%;
										  height: 100%;
										"mode="aspectFill" src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1616398636000_706.png" />
								</view>
							</view>
							<view class="good-info">
								<view class="good-name">柴门荟</view>
								<view class="good-price-info">
									<span class="price">极致川味匠心的餐厅</span>
								</view>
							</view>
						</view>
					</u-col>
					<u-col span="6">
						<view class="good_study_two" @click="openGood" :style="{borderRadius:'10px'}">
							<view class="img-box">
								<view class="img-show" :style="{'border-top-left-radius':'10px'}">
									<image style="
										  width: 100%;
										  height: 100%;
										"mode="aspectFill" src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1616398636000_706.png" />
								</view>
							</view>
							<view class="good-info">
								<view class="good-name">柴门荟</view>
								<view class="good-price-info">
									<span class="price">极致川味匠心的餐厅</span>
								</view>
							</view>
						</view>
					</u-col>
				</u-row>
			</scroll-view>
		</view>
		<tabbars></tabbars>
	</div>
</template>

<script>
	import tabbars from '@/components/tabbar/index';
	export default {
		components:{
			tabbars
		},
		data() {
			return {
				mainColor: '',
				active: 0,
				searchKey:"",
				typeList: [{
					Id: 0,
					Name: '全部'
				}, {
					Id: 1,
					Name: '特色餐饮'
				}, {
					Id: 2,
					Name: '文娱休闲'
				}, {
					Id: 3,
					Name: '儿童亲子'
				}, {
					Id: 4,
					Name: '便民生活'
				}, {
					Id: 5,
					Name: '服装服饰'
				}, {
					Id: 4,
					Name: '饮品烘焙'
				}, {
					Id: 4,
					Name: '生活用品'
				}, {
					Id: 4,
					Name: '其他'
				}]
			};
		},
		created() {
			this.mainColor = this.$uiConfig.mainColor;
		},
		mounted() {
			uni.setNavigationBarTitle({
				title: '品牌列表',
			});
		},
		methods: {
			changeHandler(i) {
				this.active = i;
			},
			openGood(id) {
				uni.navigateTo({
					url: 'pages/kotra/carrier/detail?id=' + id,
				});
			},
			searchHandler(val){}
		}
	};
</script>

<style>
	.good_study_two {
		position: relative;
		margin-bottom: 12px;
		border: 1rpx solid transparent;
		border-radius: 10rpx;
		overflow: hidden;
		box-shadow: 0 4px 10px 1px #e6e5e5;
		background-color: #fff;
	}
	
	.good_study_two .tips {
		width: 64rpx;
		height: 64rpx;
		position: absolute;
		top: 0;
		left: 0;
		z-index: 4;
	}
	
	.good_study_two .img-box {
		width: 100%;
		height: 0;
		padding-top: 100%;
		position: relative;
		overflow: hidden;
	}
	
	.good_study_two .img-box .img-show {
		position: absolute;
		left: 0;
		top: 0;
		bottom: 0;
		right: 0;
		width: 100%;
		height: 100%;
		overflow: hidden;
	}
	
	.good_study_two .guding {
		position: relative;
	}
	
	.good_study_two .guding .img-box {
		position: absolute;
		left: 0;
		right: 0;
		bottom: 0;
		top: 0;
	}
	
	.good_study_two .good-info {
		padding: 15rpx;
	}
	
	.good_study_two .good-info .good-name {
		overflow: hidden;
		text-overflow: ellipsis;
		display: -webkit-box;
		-webkit-line-clamp: 1;
		-webkit-box-orient: vertical;
		margin-bottom: 8px;
		color: #111111;
		font-size: 26rpx;
		font-weight: bold;
	}
	
	.good_study_two .good-info .good-price-info {
		display: flex;
		color: #999999;
		overflow: hidden;
		text-overflow: ellipsis;
		display: -webkit-box;
		-webkit-line-clamp: 1;
		-webkit-box-orient: vertical;
		font-size: 22rpx;
	}
	
	.good_study_two .good-info .good-price-info .price {
		color: #999999;
		/* flex: 1; */
		font-size: 11px;
		overflow: hidden;
		text-overflow: ellipsis;
		display: -webkit-box;
		-webkit-line-clamp: 1;
		-webkit-box-orient: vertical;
	}
	
	.good_study_two .good-info .good-price-info .buy {
		width: 24px;
		text-align: right;
	}
</style>
