<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);">
			<scroll-view :scroll-y="true" :enable-back-to-top="true" :enable-flex="true"
				style="height: 100%; padding-bottom: 0px;">
				<div class="good_study_one" @click="openGood(1)" :style="{
					borderRadius:'15px'
				}">
					<view class="img-box">
						<view class="img-show">
							<image style="
						  width: 100%;
						  height:100%;
						  border-radius: 10rpx 10rpx 0 0;
						" mode='aspectFill'
								src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1616400499000_427.jpg" />
						</view>
					</view>
					<div class="good-info">
						<div class="good-name">
							<div class="span-name">银泰in99</div>
							<div class="span-type">百货</div>
						</div>
						<div class="good-price-info">
							<u-icon name="location" color="#999" size="24"></u-icon>
							<span class="price" style="margin-left: 5px;">成都市武侯区天府大道北段1199号</span>
						</div>
					</div>
				</div>
				<div class="good_study_one" @click="openGood(1)" :style="{
					borderRadius:'15px'
				}">
					<view class="img-box">
						<view class="img-show">
							<image style="
						  width: 100%;
						  height:100%;
						  border-radius: 10rpx 10rpx 0 0;
						" mode='aspectFill'
								src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1616400499000_427.jpg" />
						</view>
					</view>
					<div class="good-info">
						<div class="good-name">
							<div class="span-name">银泰in99</div>
							<div class="span-type">百货</div>
						</div>
						<div class="good-price-info">
							<u-icon name="location" color="#999" size="24"></u-icon>
							<span class="price" style="margin-left: 5px;">成都市武侯区天府大道北段1199号</span>
						</div>
					</div>
				</div>
				<div class="good_study_one" @click="openGood(1)" :style="{
					borderRadius:'15px'
				}">
					<view class="img-box">
						<view class="img-show">
							<image style="
						  width: 100%;
						  height:100%;
						  border-radius: 10rpx 10rpx 0 0;
						" mode='aspectFill'
								src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1616400499000_427.jpg" />
						</view>
					</view>
					<div class="good-info">
						<div class="good-name">
							<div class="span-name">银泰in99</div>
							<div class="span-type">百货</div>
						</div>
						<div class="good-price-info">
							<u-icon name="location" color="#999" size="24"></u-icon>
							<span class="price" style="margin-left: 5px;">成都市武侯区天府大道北段1199号</span>
						</div>
					</div>
				</div>
				<div class="good_study_one" @click="openGood(1)" :style="{
					borderRadius:'15px'
				}">
					<view class="img-box">
						<view class="img-show">
							<image style="
						  width: 100%;
						  height:100%;
						  border-radius: 10rpx 10rpx 0 0;
						" mode='aspectFill'
								src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1616400499000_427.jpg" />
						</view>
					</view>
					<div class="good-info">
						<div class="good-name">
							<div class="span-name">银泰in99</div>
							<div class="span-type">百货</div>
						</div>
						<div class="good-price-info">
							<u-icon name="location" color="#999" size="24"></u-icon>
							<span class="price" style="margin-left: 5px;">成都市武侯区天府大道北段1199号</span>
						</div>
					</div>
				</div>
				<div class="good_study_one" @click="openGood(1)" :style="{
					borderRadius:'15px'
				}">
					<view class="img-box">
						<view class="img-show">
							<image style="
						  width: 100%;
						  height:100%;
						  border-radius: 10rpx 10rpx 0 0;
						" mode='aspectFill'
								src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1616400499000_427.jpg" />
						</view>
					</view>
					<div class="good-info">
						<div class="good-name">
							<div class="span-name">银泰in99</div>
							<div class="span-type">百货</div>
						</div>
						<div class="good-price-info">
							<u-icon name="location" color="#999" size="24"></u-icon>
							<span class="price" style="margin-left: 5px;">成都市武侯区天府大道北段1199号</span>
						</div>
					</div>
				</div>
				<div class="good_study_one" @click="openGood(1)" :style="{
					borderRadius:'15px'
				}">
					<view class="img-box">
						<view class="img-show">
							<image style="
						  width: 100%;
						  height:100%;
						  border-radius: 10rpx 10rpx 0 0;
						" mode='aspectFill'
								src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1616400499000_427.jpg" />
						</view>
					</view>
					<div class="good-info">
						<div class="good-name">
							<div class="span-name">银泰in99</div>
							<div class="span-type">百货</div>
						</div>
						<div class="good-price-info">
							<u-icon name="location" color="#999" size="24"></u-icon>
							<span class="price" style="margin-left: 5px;">成都市武侯区天府大道北段1199号</span>
						</div>
					</div>
				</div>
				<div class="good_study_one" @click="openGood(1)" :style="{
					borderRadius:'15px'
				}">
					<view class="img-box">
						<view class="img-show">
							<image style="
						  width: 100%;
						  height:100%;
						  border-radius: 10rpx 10rpx 0 0;
						" mode='aspectFill'
								src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1616400499000_427.jpg" />
						</view>
					</view>
					<div class="good-info">
						<div class="good-name">
							<div class="span-name">银泰in99</div>
							<div class="span-type">百货</div>
						</div>
						<div class="good-price-info">
							<u-icon name="location" color="#999" size="24"></u-icon>
							<span class="price" style="margin-left: 5px;">成都市武侯区天府大道北段1199号</span>
						</div>
					</div>
				</div>
				<div class="good_study_one" @click="openGood(1)" :style="{
					borderRadius:'15px'
				}">
					<view class="img-box">
						<view class="img-show">
							<image style="
						  width: 100%;
						  height:100%;
						  border-radius: 10rpx 10rpx 0 0;
						" mode='aspectFill'
								src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1616400499000_427.jpg" />
						</view>
					</view>
					<div class="good-info">
						<div class="good-name">
							<div class="span-name">银泰in99</div>
							<div class="span-type">百货</div>
						</div>
						<div class="good-price-info">
							<u-icon name="location" color="#999" size="24"></u-icon>
							<span class="price" style="margin-left: 5px;">成都市武侯区天府大道北段1199号</span>
						</div>
					</div>
				</div>
			</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: 'Shopping Mall'
				}, {
					Id: 3,
					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_one {
		margin: 12px;
		position: relative;
		border: 1rpx solid transparent;
		border-radius: 10rpx;
		overflow: hidden;
	}

	.good_study_one .tips {
		width: 64rpx;
		height: 64rpx;
		position: absolute;
		top: 0;
		left: 0;
		z-index: 4;
	}

	.good_study_one .guding {
		position: relative;
	}

	/* .good_study_one .guding .img-box {
		position: absolute;
		left: 0;
		right: 0;
		bottom: 0;
		top: 0;
	} */
	.good_study_one .img-box {
		width: 100%;
		height: 0;
		padding-top: 49%;
		position: relative;
		overflow: hidden;
	}

	.good_study_one .img-box .img-show {
		position: absolute;
		left: 0;
		top: 0;
		bottom: 0;
		right: 0;
		width: 100%;
		height: 100%;
		overflow: hidden;
	}

	.good_study_one .good-info {
		padding: 12px;
		background-color: #fff;
	}

	.good_study_one .good-info .good-name {
		display: flex;
		align-items: center;
	}
	.good_study_one .good-info .good-name .span-name{
		overflow: hidden;
		text-overflow: ellipsis;
		display: -webkit-box;
		-webkit-line-clamp: 2;
		-webkit-box-orient: vertical;
		font-size: 28rpx;
		font-weight: bold;
		color: #111;
		padding-bottom: 5px;
		flex: 1;
	}
	.good_study_one .good-info .good-name .span-type{
		font-weight: 500;
		color: #999999;
		font-size: 24rpx;
		margin-left: 10px;
	}
	.good_study_one .good-info .good-price-info {
		display: flex;
	}

	.good_study_one .good-info .good-price-info .price {
		color: #999999;
		font-size: 24rpx;
		flex: 1;
	}

	.good_study_one .good-info .good-price-info .buy {
		width: 24px;
		text-align: right;
	}
</style>
