<template>
	<div class="view">
		<div class="info" v-for="(item, index) in data" :key="index" @click="toIssue(index)">
			<div class="card">
				<div class="left">
					<image :src="$util.img('/upload/weapp/user/cover.png')"></image>
				</div>
				<div class="right">
					<div class="top">
						{{item.title}}
					</div>
					<div class="bottom">
						<span class="origin">产地：{{item.origin}}</span>
						<span class="unit">规格：{{item.spec_name||'-'}}</span>
						<span class="number">×{{item.quantity}}</span>
					</div>
				</div>
			</div>
			<div class="footer">
				<span class="quantity">共{{item.unit}}件，</span>
				<span class="count">合计：￥</span>
				<span class="number">{{item.price}}</span>
			</div>
		</div>
	</div>
</template>

<script>
	export default {
		data() {
			return {
				data: [{
					check: true,
					title: '路易拉',
					origin: '山东',
					unit: '0.5kg/袋',
					quantity: 8,
					status: '交易成功',
					price: 638.88
				},{
					check: true,
					title: '路易拉菲 法国 原瓶进口红酒21312312312312312…',
					origin: '山东',
					unit: '0.5kg/袋',
					quantity: 8,
					status: '交易成功',
					price: 638.88
				},{
					check: true,
					title: '路易拉菲 法国 原瓶进口红酒21312312312312312…',
					origin: '山东',
					unit: '0.5kg/袋',
					quantity: 8,
					status: '交易成功',
					price: 638.88
				},{
					check: true,
					title: '路易拉菲 法国 原瓶进口红酒21312312312312312…',
					origin: '山东',
					unit: '0.5kg/袋',
					quantity: 8,
					status: '交易成功',
					price: 638.88
				},{
					check: true,
					title: '路易拉菲 法国 原瓶进口红酒21312312312312312…',
					origin: '山东',
					unit: '0.5kg/袋',
					quantity: 8,
					status: '交易成功',
					price: 638.88
				},{
					check: true,
					title: '路易拉菲 法国 原瓶进口红酒21312312312312312…',
					origin: '山东',
					unit: '0.5kg/袋',
					quantity: 8,
					status: '交易成功',
					price: 638.88
				},{
					check: true,
					title: '路易拉菲 法国 原瓶进口红酒21312312312312312…',
					origin: '山东',
					unit: '0.5kg/袋',
					quantity: 8,
					status: '交易成功',
					price: 638.88
				},{
					check: true,
					title: '路易拉菲 法国 原瓶进口红酒21312312312312312…',
					origin: '山东',
					unit: '0.5kg/袋',
					quantity: 8,
					status: '交易成功',
					price: 638.88
				},{
					check: true,
					title: '路易拉菲 法国 原瓶进口红酒21312312312312312…',
					origin: '山东',
					unit: '0.5kg/袋',
					quantity: 8,
					status: '交易成功',
					price: 638.88
				},{
					check: true,
					title: '路易拉菲 法国 原瓶进口红酒21312312312312312…',
					origin: '山东',
					unit: '0.5kg/袋',
					quantity: 8,
					status: '交易成功',
					price: 638.88
				},{
					check: true,
					title: '路易拉菲 法国 原瓶进口红酒21312312312312312…',
					origin: '山东',
					unit: '0.5kg/袋',
					quantity: 8,
					status: '交易成功',
					price: 638.88
				},{
					check: true,
					title: '路易拉菲 法国 原瓶进口红酒21312312312312312…',
					origin: '山东',
					unit: '0.5kg/袋',
					quantity: 8,
					status: '交易成功',
					price: 638.88
				}]
			}
		}
	}
</script>

<style lang="scss" scoped>
	.view {
		padding: 24rpx;
		.info{
			box-sizing: border-box;
			background: #FFFFFF;
			border-radius: 24rpx;
			padding: 32rpx 24rpx ;
			margin-bottom: 24rpx;
			.card {
				display: flex;
				.left {
					image {
						width: 176rpx;
						height: 176rpx;
						margin-left: 24rpx;
						border-radius: 8rpx;
					}
				}
				.right {
					flex-grow:1;
					margin-left: 24rpx;
					display: flex;
					justify-content: space-between;
					flex-direction: column;
					.top{
						width: 100%;
						font-size: 28rpx;
						font-family: PingFangSC-Regular, PingFang SC;
						font-weight: 400;
						color: #222222;
						word-break: break-all;
					}
					.bottom {					
						height: 34rpx;
						font-size: 24rpx;
						font-family: PingFangSC-Regular, PingFang SC;
						font-weight: 400;
						color: #999999;
						line-height: 34rpx;
						display: flex;
						justify-content: flex-start;
						.unit {
							margin-left: 16rpx;
						}
						.number{
							flex: 1;
							text-align: right;
						}
					}
					
				}
			}
			.footer {
				box-sizing: border-box;
				padding-top: 32rpx;
				text-align: right;
				.quantity {
					font-size: 28rpx;
					font-family: PingFangSC-Regular, PingFang SC;
					font-weight: 400;
					color: #999999;
				}
				.count{
					font-size: 28rpx;
					font-family: PingFangSC-Regular, PingFang SC;
					color: #222222;
				}
				.number {
					font-size: 36rpx;
					font-family: DINAlternate-Bold, DINAlternate;
					font-weight: bold;
					color: #222222;
				}
			}
		}
	}
</style>