<template>
	<view class="restaurant-list-item" @click="confirm">
		<view class="img-box">
			<image :src="data.CoverImg" mode="aspectFill"></image>
		</view>
		<view class="restaurant-info">
			<view class="restaurant-name">{{data.Name}}</view>
			<!-- <view class="restaurant-start">
				<view class="other-rate">
					<text class="feature">{{data.Feature}}</text>
					<span class="line"></span>
				</view>
			</view> -->
			<view class="localtion feature">{{data.Feature}}</view>
			<view class="localtion feature addr">{{data.Address}}</view>
			<view style="display: flex;flex-wrap: wrap;">
				<view v-for="(item,index) in data.FoodTag" :key="index">
					<u-tag :text="item" bg-color="#FFF" border-color="#DFBE6E" color="#DFBE6E" size="mini" style="margin-right: 20rpx;" v-if="item"></u-tag>
				</view>
				<view v-for="(item,index) in data.GeographicTag" :key="index">
					<u-tag :text="item" bg-color="#FFF" border-color="#DFBE6E" color="#DFBE6E" size="mini" style="margin-right: 20rpx;" v-if="item"></u-tag>
				</view>
				
			</view>
			<view class="price">
				<text>￥</text>
				<!-- <text class="money">{{data.B2BPrice}}</text> -->
				<text class="money">{{$utils.getretailer()==true? data.B2BPrice:data.B2CPrice}}  </text>
				<text>/起</text>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		props:{
			restaurantType:{
				type:Number,
				default:0
			},
			data:{
				type:Object,
				default:{}
			}
		},
		data() {
			return {
				// key: value
			}
		},
		methods:{
			confirm(){
				this.$emit("confirm")
			}
		}
	}
</script>

<style>
	.restaurant-list-item{
		margin: 30rpx 30rpx 0 30rpx;
		padding-bottom: 30rpx;
		border-bottom: 1rpx solid #E2E2E2;
		display: flex;
		/* align-items: center; */
	}
	.restaurant-list-item .img-box{
		width: 220rpx;
		height: 280rpx;
		border-radius: 20rpx;
		overflow: hidden;
		margin-right: 30rpx;
		box-shadow: 0rpx 10rpx 30rpx 0rpx rgba(36, 36, 36, 0.2);
	}
	.restaurant-list-item .img-box image{
		width: 100%;
		height: 100%;
	}
	.restaurant-list-item .restaurant-info{
		width: 1px;
		flex: 1;
		padding-top: 20rpx;
	}
	.restaurant-list-item .restaurant-info .restaurant-name{
		font-weight: 500;
		color: #111111;
		line-height: 30rpx;
		font-size: 30rpx;
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
	}
	.restaurant-list-item .restaurant-info .restaurant-start{
		margin:10rpx 0;
	}
	.restaurant-list-item .restaurant-info .restaurant-start .rate{
		font-size: 30rpx;
		font-weight: 500;
		color: #999999;
		line-height: 30rpx;
	}
	.restaurant-list-item .restaurant-info .restaurant-start .other-rate{
		display: inline-block;
		position: relative;
	}
	.restaurant-list-item .restaurant-info .restaurant-start .other-rate text{
		position: relative;z-index: 2;
		font-size: 30rpx;
		line-height: 30rpx;
		font-weight: 500;
		color: #111;
	}
	.restaurant-list-item .restaurant-info .restaurant-start .other-rate .line{
		background-color: #DFBE6E;
		height: 6px;
		bottom: 2px;
		left: 0;
		right: 0;
		position: absolute;
		z-index: 1;
	}
	.restaurant-list-item .restaurant-info .localtion{
		font-size: 24rpx;
		font-weight: 400;
		color: #999999;
		line-height: 30rpx;
		
		text-overflow: -o-ellipsis-lastline;
		overflow: hidden;
		text-overflow: ellipsis;
		display: -webkit-box;
		-webkit-line-clamp: 2;
		-webkit-box-orient: vertical;
		margin-bottom: 10rpx;
	}
	.restaurant-list-item .restaurant-info .price{
		margin-top: 10rpx;
		font-weight: 500;
		color: #111;
		font-size: 20rpx;
		text-align: right;
	}
	.restaurant-list-item .restaurant-info .price .money{
		font-size: 36rpx;
	}
	.feature{
		margin-top: 20rpx;
		text-align: justify;
		text-align-last: left;
		overflow : hidden;
		text-overflow: ellipsis;
		display: -webkit-box;
		-webkit-line-clamp: 2;
		-webkit-box-orient: vertical;
	}
	.addr{
		color: #111111 !important;
	}
</style>
