<!--
 * @Author: ch
 * @Date: 2022-03-23 10:29:07
 * @LastEditors: ch
 * @LastEditTime: 2022-04-21 16:23:22
 * @Description: file content
-->
<template>
	<view class="pick">
		<view class="max" @click="$Router.push(`/goodsDetail?id=${max.id}`)">
			<view class="title">{{max.name}}</view>
			<view class="desc">{{max.name}}</view>
			<!-- <view class="tag"></view> -->
			<!-- <view class="price">￥{{max.startingPrice}}</view> -->
			<UiMoney class="price" :money="max.startingPrice" prefix></UiMoney>
			<view class="img-box">
				<image class="img" :src="max.mainPicture"/>
			</view>
		</view>
		<view class="min" @click="$Router.push(`/goodsDetail?id=${minOne.id}`)">
			<view class="title">{{minOne.name}}</view>
			<view class="min--info-box">
				<view class="min--info-box-right">
					<view class="desc">{{minOne.name}}</view>
					<!-- <view class="tag"></view> -->
					<UiMoney class="price" :money="minOne.startingPrice" prefix></UiMoney>
				</view>
				<view class="img-box">
					<image class="img" :src="minOne.mainPicture"/>
				</view>
			</view>
		</view>
		<view class="min" @click="$Router.push(`/goodsDetail?id=${minTwo.id}`)">
			<view class="title">{{minTwo.name}}</view>
			<view class="min--info-box">
				<view class="min--info-box-right">
					<view class="desc">{{minTwo.name}}</view>
					<view class="tag"></view>
					<UiMoney class="price" :money="minTwo.startingPrice" prefix></UiMoney>
				</view>
				<view class="img-box">
					<image class="img" :src="minTwo.mainPicture"/>
				</view>
			</view>
		</view>
		
	</view>
</template>
<script>
import UiMoney from '../../../components/UiMoney.vue'
export default {
	components: { UiMoney },
	data(){
		return{}
	},
	props:{
		data : {
			type : Array,
			default : () => ([])
		}
	},
	computed:{
		max (){
			return this.data[0] || {}
		},
		minOne (){
			return this.data[1] || {}
		},
		minTwo (){
			return this.data[2] || {}
		}
	}
}
</script>
<style lang="scss" scoped>

.pick{
	margin: 0 30rpx;
	height: 450rpx;
	display: flex;
	flex-flow: column wrap;
	justify-content: space-between;
	.title,.desc{
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
		margin: 10rpx 20rpx;
	}
	.title{
		margin-top: 20rpx;
		font-weight: bold;
	}
	.desc{
		color: $color-grey4;
		font-size: 22rpx;
	}
	.price{
		margin: 24rpx 0 10rpx 20rpx;
	}
}

.max{
	width: 335rpx;
	height: 450rpx;
	background: $color-grey0;
	border-radius: 8rpx;

	.img-box{
		display: flex;
		justify-content: end;
	}
	.img{
		width: 260rpx;
		height: 260rpx;
	}
}
.min{
	width: 335rpx;
	height: 215rpx;
	background: $color-grey0;
	border-radius: 8rpx;
	margin-left: 20rpx;
	&--info-box{
		display: flex;
		justify-content: space-between;
	}
	&--info-box-right{
		width: 180rpx;
	}

	.img{
		width: 160rpx;
		height: 160rpx;
	}
	.desc{
		margin-top: 0;
	}
}
/deep/ .price{
	text{
		color: $color-yellow4;
		font-size: $font-size-lg;
		font-weight: bold;
	}
	.ui-money--prefix{
		font-size: $font-size-sm;
	}
}
</style>