<template>
	<view class="recommend">
		<view class="title">
			<image src="@/static/img/recommend.png" mode=""></image>
		</view>
		<view class="list">
			<view class="item" v-for="d in data" @click="navto('/pages/product/product?id=' + d.id)">
				<view class="img">
					<image :src="d.image" mode=""></image>
				</view>
				<view class="name nowarp">
					{{ d.store_name }}
				</view>
				<view class="about">
					
				</view>
				<view class="allprice">
					<text class="price">￥{{ d.price }}</text>
					<text class="ot-price">￥{{ d.ot_price }}</text>
				</view>
			</view>
		</view>
		<!-- <view class="load"> 
		 ---------{{ loadingType == 'loadmore'?'加载中': '加载完成'}}---------
		</view> -->
	</view>
</template>

<script>
	export default {
		props: ['data'],
		data() {
			return {
				page: 1,
				limit: 10,
				sum: 0,
				loadingType: 'loadmore',
				
			}
		},
		mounted() {
			
		},
		methods: {
			navto(url) {
				uni.navigateTo({
					url: url
				})
			}
		}
	}
</script>

<style lang="scss">
$grey: #95A0B1;
$text: #333333;
$red: #FF4C4C;
	.recommend {
		background-color: #fff;
		padding: 30rpx;
		.title {
			text-align: center;
			image {
				width: 350rpx;
				height: 30rpx;
			}
		}
		.list {
			padding: 20rpx 0;
			display: flex;
			justify-content: space-between;
			flex-wrap: wrap;
			.item {
				// background-color: #fff;
				border-radius: 10rpx;
				overflow: hidden;
				box-shadow: 2rpx 2rpx 10rpx #e1e1e1;
				margin: 10rpx 0;
				width: 48%;
				height: 0;
				padding-bottom: calc(48% + 120rpx);
				.img {
					border-radius: 10rpx;
					overflow: hidden;
					width: 100%;
					height: 344rpx;
					image {
						width: 100%;
						height: 100%;
					}
				}
				.name {
					margin: 0 10rpx;
					font-size: 30rpx;
					font-weight: bold;
				}
				.allprice {
					padding: 20rpx 0;
					.price {
						color: $red;
					}
					.ot-price {
						color: $grey;
						text-decoration: line-through;
						font-size: 26rpx;
					}
				}
			}
		}
		.load {
			text-align: center;
			color: $grey;
			font-size: 28rpx;
		}
	}
		
</style>
