<template>
	<view class="centent">
		<view class="title" @click="$url('/pages/discover/discover')">精选发现好物</view>
		<scroll-view class="find-scroll" :scroll-x="true">
			<view class="find-content">
				<!-- :class="{'max-item': index == 0}"  -->
				<view class="find-item" 
					@click="$url('/pages/discover/discoverdetails')"
					v-for="(item, index) in list" :key="index">
					<image class="img" :src="item.image"></image>
					<view class="lf-line-2 info">{{ item.associate.title }}</view>
				</view>
			</view>
			<view style="height: 10rpx;"></view>
		</scroll-view>
	</view>
</template>

<script>
	export default {
		props: {
			list: {
				type: Array,
				default: []
			}
		},
		data(){
			return {
				current: 0
			}
		},
		created(){
			
		},
		methods: {
			
		}
	}
</script>

<style lang="scss" scoped="scoped">
	.centent{
		padding-top: 60rpx;
	}
	.title{
		font-size: 36rpx;
		font-weight: bold;
		text-align: center;
		color: #222222;
		margin-bottom: 30rpx;
	}
	.find-scroll{
		padding: 0rpx 32rpx;
		width: 750rpx;
		height: max-content;
		box-sizing: border-box;
		.find-content{
			display: flex;
			width: max-content; 
			align-items: center;
			padding: 10rpx 0 0 10rpx;
		}
		.find-item{
			width: 380rpx;
			height: 480rpx;
			background: #FFFFFF;
			box-shadow: 0rpx 2rpx 8rpx 1rpx rgba(0, 0, 0, 0.1);
			margin-right: 20rpx;
			.img{
				width: 380rpx;
				height: 380rpx;
				background-color: #D8D8D8;
			}
			.info{
				padding: 10rpx;
				width: 380rpx;
				height: 100rpx;
				box-sizing: border-box;
				font-size: 24rpx;
				line-height: 1.8;
			}
		}
		.max-item{
			height: 563rpx;
			width: 425rpx;
			.img{
				width: 425rpx;
				height: 425rpx;
			}
			.info{
				width: 425rpx;
				height: 138rpx;
				padding: 20rpx;
				font-size: 26rpx;
				line-height: 2.1;
			}
		}
	}
</style>
