<template>
	<view class="dataList">
		<view class="list">
			<view class="item" v-for="d in data" @click="navto('/pages/product/product?id=' + d.id + '&is_gold=' + 1)">
				<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>
				</view>
			</view>
		</view>
		<view class="load"> 
		 ---------{{ data.loadingType == 'loadmore'?'加载中': '加载完成'}}---------
		</view>
	</view>
</template>

<script>
	export default {
		props: ['data'],
		methods: {
			navto(url){
				uni.navigateTo({
					url
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
$grey: #95A0B1;
$text: #333333;
$red: #FF4C4C;
	.dataList {
		.list {
			padding: 20rpx;
			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>
