<template>
	<view class="container">
		<!-- 每一个套餐区域 -->
		<view class="setMeal_box" v-for="item in list" :key="item.id">
			<!-- 图片区域 -->
			<view class="box_img">
				<img mode="aspectFill" :src="item.img" />
			</view>

			<!-- 套餐信息区域 -->
			<view class="box_info">
				<view class="info_msg">{{ item.title }}</view>
				<view class="info_price">
					<view class="new">
						{{ item.price }}
						<text>起</text>
					</view>

					<view class="old">市场价{{ item.outprice }}</view>
				</view>
				<view class="info_btn">
					<view class="btn_count">已售{{ item.number }}张</view>

					<view class="btn_pay" @click="handleTip">立即抢购</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
export default {
	data() {
		return {
			// 套餐
			list: [
				{
					id: 1,
					img: 'https://jtishfw.ncjti.edu.cn/homestay/setmeal/1.jpg',
					title: '周末不加价|靖安双溪抱朴小院3天2晚含门票|三爪仑漂流双人',
					price: '¥180',
					outprice: '¥400',
					number: 1151
				},
				{
					id: 1,
					img: 'https://jtishfw.ncjti.edu.cn/homestay/setmeal/2.png',
					title: '新店开业：国庆中秋大优惠|靖安双溪抱朴小院6天5晚含门票|特色小吃3份',
					price: '¥240',
					outprice: '¥520',
					number: 188
				},
				{
					id: 1,
					img: 'https://jtishfw.ncjti.edu.cn/homestay/setmeal/3.png',
					title: '中华传统文化园套票|特色小吃2份',
					price: '¥180',
					outprice: '¥400',
					number: 58
				},
				{
					id: 1,
					img: 'https://jtishfw.ncjti.edu.cn/homestay/setmeal/4.png',
					title: '三爪仑漂流五人人|中华传统文化园套票|特色小吃5份',
					price: '¥900',
					outprice: '¥1700',
					number: 88
				},
				{
					id: 1,
					img: 'https://jtishfw.ncjti.edu.cn/homestay/setmeal/5.png',
					title: '三爪仑漂流双人|中华传统文化园套票',
					price: '¥180',
					outprice: '¥400',
					number: 88
				},
				{
					id: 1,
					img: 'https://jtishfw.ncjti.edu.cn/homestay/setmeal/6.jpg',
					title: '中华传统文化园套票|特色小吃3份',
					price: '¥240',
					outprice: '¥520',
					number: 72
				}
			]
		}
	},
	methods: {
		handleTip() {
			uni.showToast({
				title: '功能开发中',
				icon: 'none'
			})
		}
	}
}
</script>

<style lang="scss" scoped>
.container {
	box-sizing: border-box;
	padding: 20rpx 30rpx;
	min-height: 100vh;
	background-color: #ebeced;

	.setMeal_box {
		margin-bottom: 20rpx;
		border-radius: 10rpx;
		background-color: #fff;

		.box_img {
			height: 377rpx;

			img {
				width: 100%;
				height: 100%;
			}
		}

		.box_info {
			padding: 0 25rpx;
			.info_msg {
				margin-top: 20rpx;
				line-height: 45rpx;
				font-size: 28rpx;
			}

			.info_price {
				display: flex;
				height: 62rpx;
				line-height: 62rpx;

				.new {
					color: #ff5733;
					font-size: 36rpx;
					font-weight: bold;

					text {
						font-size: 24rpx;
						font-weight: 400;
					}
				}

				.old {
					margin-left: 20rpx;
					color: #a6a6a6;
					font-size: 24rpx;
					text-decoration: line-through;
				}
			}

			.info_btn {
				display: flex;
				justify-content: space-between;
				height: 98rpx;

				.btn_count {
					padding: 0 20rpx;
					margin-top: 10rpx;
					height: 56rpx;
					line-height: 56rpx;
					color: #fff;
					font-size: 24rpx;
					border-radius: 10rpx;
					background-color: #e86346;
				}

				.btn_pay {
					display: flex;
					justify-content: center;
					align-items: center;
					margin-top: -10rpx;
					width: 204rpx;
					height: 72rpx;
					border-radius: 48rpx;
					color: #ff5733;
					font-size: 32rpx;
					border: 1rpx solid #ff5733;
				}
			}
		}
	}
}
</style>
