<template>
	<view>
		<view class="active-plate d-flex justify-content-between">
			<view class="live bg-white radius10">
				<view class="top d-flex align-items-center">
					<view class="title titColor">新品直播</view>
					<view class="sub">采一手新品</view>
				</view>
				<view class="live-box" @click="toVideo">
					<image src="https://shop.xianghuaqi.net.cn/images/live.png"></image>
					<view class="tips d-flex justify-content-between align-items-center">
						<image src="../../static/home/liveicon.png" mode=""></image>
						<text>享限时折扣</text>
					</view>
					<view class="title">直播看新品</view>
				</view>
				<view class="d-flex justify-content-between">
					<view class="goods" v-for="(item, index) in liveGoods" :key="index">
						<image :src="item.image" mode=""></image>
						<!-- <view class="name">
							{{item.name}}
						</view> -->
					</view>
				</view>
			</view>
			<view class="right-wrap d-flex align-content-between flex-wrap">
				<view class="hot-goods bg-white radius10">
					<view class="top d-flex justify-content-between align-items-center">
						<view class="title titColor">爆品火拼</view>
						<view class="count-down d-flex align-items-center">
							<image src="../../static/home/down.png" mode=""></image>
							<view class="num"><u-count-down :time="countDown" format="HH:mm:ss"></u-count-down></view>
						</view>
					</view>
					<view class="goods d-flex align-items-center justify-content-between">
						<view class="item" v-for="(item, index) in hotGoods" :key="index">
							<image :src="item.image" mode=""></image>
							<!-- <view class="price">
								￥{{item.price}}优惠价
							</view> -->
						</view>
					</view>
				</view>
				<view class="fruits bg-white radius10">
					<view class="top d-flex align-items-center">
						<view class="title titColor">水果生鲜</view>
						<view class="sub">采一手新品</view>
					</view>
					<view class="goods d-flex align-items-center justify-content-between">
						<view class="item" v-for="(item, index) in hotFruits" :key="index">
							<image :src="item.image" mode=""></image>
							<!-- <view class="price">
								￥{{item.price}}优惠价
							</view> -->
						</view>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
export default {
	name: 'hua-active-plate',
	props: {
		liveGoods: {},
		hotGoods: {},
		hotFruits: {},
		countDown: {}
	},
	data() {
		return {};
	},
	methods: {
		toVideo() {
			console.log('跳转视频');
		}
	}
};
</script>

<style lang="scss">
.active-plate {
	margin: 32upx auto;
	.live {
		width: 334rpx;
		padding: 14rpx 16rpx 30rpx;
		box-sizing: border-box;
		.top {
			height: 44rpx;
			.title {
				font-weight: 700;
			}
			.sub {
				font-size: 24rpx;
				color: #616161;
				margin-left: 10rpx;
			}
		}
		.live-box {
			width: 100%;
			height: 208upx;
			position: relative;
			margin: 10upx auto 20upx;
			image {
				width: 100%;
				height: 100%;
			}
			.tips {
				position: absolute;
				bottom: 60upx;
				left: 14upx;
				padding: 0 10upx;
				height: 34upx;
				background: linear-gradient(142deg, #f16d60 0%, #f8352b 100%);
				border-radius: 4upx;
				image {
					width: 22upx;
					height: 16upx;
					margin-right: 4upx;
				}
				text {
					color: #fff;
					font-size: 20upx;
				}
			}
			.title {
				position: absolute;
				bottom: 20upx;
				left: 14upx;
				color: #fff;
				font-size: 24upx;
			}
		}
		.goods {
			position: relative;
			width: 146upx;
			height: 126upx;

			image {
				position: relative;
				width: 100%;
				height: 100%;
			}
			.name {
				position: absolute;
				color: #f8352b;
				font-size: 20upx;
				padding: 2upx 4upx;
				bottom: 0;
				left: 50%;
				transform: translateX(-50%);
				box-sizing: border-box;
				background-color: #ffe4e3;
				border-radius: 16upx;
				text-align: center;
				font-weight: 500;
			}
		}
	}
	.right-wrap {
		width: 334upx;
		.hot-goods {
			width: 100%;
			padding: 14upx 16upx 20upx;
			box-sizing: border-box;
			.top {
				.title {
					font-weight: 700;
				}
				.count-down {
					background-color: #ffd7de;
					image {
						width: 46upx;
						height: 36upx;
					}
					.num {
						font-size: 24upx !important;
						color: #f8352b;
						padding: 0 8upx;
						border-radius: 8upx;
						/deep/ .u-count-down {
							&__text {
								color: #f8352b !important;
								font-size: 24upx !important;
								line-height: unset !important;
							}
						}
					}
				}
			}
			.goods {
				margin-top: 10upx;
				.item {
					width: 126upx;
					height: 126upx;
					position: relative;
					image {
						width: 100%;
						height: 100%;
					}
					.price {
						position: absolute;
						bottom: 0;
						left: 50%;
						transform: translateX(-50%);
						font-size: 20upx;
						color: #f8352b;
						background-color: #ffe4e3;
						border-radius: 16upx;

						white-space: nowrap;
					}
				}
			}
		}

		.fruits {
			width: 100%;
			padding: 14upx 16upx 20upx;
			box-sizing: border-box;
			.title {
				font-weight: 700;
			}
			.sub {
				font-size: 28upx;
				margin-left: 10upx;
				color: #616161;
			}
			.goods {
				margin-top: 10upx;
				.item {
					width: 126upx;
					height: 126upx;
					position: relative;
					image {
						width: 100%;
						height: 100%;
					}
					.price {
						position: absolute;
						bottom: 0;
						left: 50%;
						transform: translateX(-50%);
						font-size: 20upx;
						color: #f8352b;
						background-color: #ffe4e3;
						border-radius: 16upx;

						white-space: nowrap;
					}
				}
			}
		}
	}
}
</style>
<template>
	<view>
		<view class="active-plate d-flex justify-content-between">
			<view class="live bg-white radius10">
				<view class="top d-flex align-items-center">
					<view class="title titColor">新品直播</view>
					<view class="sub">采一手新品</view>
				</view>
				<view class="live-box">
					<image src="https://shop.xianghuaqi.net.cn/images/live.png"></image>
					<view class="tips d-flex justify-content-between align-items-center">
						<image src="../../static/home/liveicon.png" mode=""></image>
						<text>享限时折扣</text>
					</view>
					<view class="title">直播看新品</view>
				</view>
				<view class="d-flex justify-content-between">
					<view class="goods" v-for="(item, index) in liveGoods" :key="index">
						<image :src="item.image" mode=""></image>
						<!-- <view class="name">
							{{item.name}}
						</view> -->
					</view>
				</view>
			</view>
			<view class="right-wrap d-flex align-content-between flex-wrap">
				<view class="hot-goods bg-white radius10">
					<view class="top d-flex justify-content-between align-items-center">
						<view class="title titColor">限时抢购</view>
						<view class="count-down d-flex align-items-center">
							<image src="../../static/home/down.png" mode=""></image>
							<view class="num"><u-count-down :timestamp="countDown" format="HH:mm:ss" color="#F8352B" separatorColor="#f8352b"></u-count-down></view>
						</view>
					</view>
					<view class="goods d-flex align-items-center justify-content-between">
						<view class="item" v-for="(item, index) in hotGoods" :key="index">
							<image :src="item.image" mode=""></image>
							<!-- <view class="price">
								￥{{item.price}}优惠价
							</view> -->
						</view>
					</view>
				</view>
				<view class="fruits bg-white radius10">
					<view class="top d-flex align-items-center">
						<view class="title titColor">火热拼团</view>
						<view class="sub">采一手新品</view>
					</view>
					<view class="goods d-flex align-items-center justify-content-between">
						<view class="item" v-for="(item, index) in hotFruits" :key="index">
							<image :src="item.image" mode=""></image>
							<!-- <view class="price">
								￥{{item.price}}优惠价
							</view> -->
						</view>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
export default {
	name: 'hua-active-plate',
	props: {
		liveGoods: {},
		hotGoods: {},
		hotFruits: {}
	},
	data() {
		return {
			countDown: 86400
		};
	}
};
</script>

<style lang="scss">
.active-plate {
	margin: 32upx auto;
	.live {
		width: 334upx;
		padding: 14upx 16upx 30upx;
		box-sizing: border-box;
		.top {
			height: 44upx;
			.title {
				font-weight: 700;
			}
			.sub {
				font-size: 28upx;
				color: #616161;
				margin-left: 10upx;
			}
		}
		.live-box {
			width: 100%;
			height: 208upx;
			position: relative;
			margin: 10upx auto 20upx;
			image {
				width: 100%;
				height: 100%;
			}
			.tips {
				position: absolute;
				bottom: 60upx;
				left: 14upx;
				padding: 0 10upx;
				height: 34upx;
				background: linear-gradient(142deg, #f16d60 0%, #f8352b 100%);
				border-radius: 4upx;
				image {
					width: 22upx;
					height: 16upx;
					margin-right: 4upx;
				}
				text {
					color: #fff;
					font-size: 20upx;
				}
			}
			.title {
				position: absolute;
				bottom: 20upx;
				left: 14upx;
				color: #fff;
				font-size: 24upx;
			}
		}
		.goods {
			position: relative;
			width: 146upx;
			height: 126upx;

			image {
				position: relative;
				width: 100%;
				height: 100%;
			}
			.name {
				position: absolute;
				color: #f8352b;
				font-size: 20upx;
				padding: 2upx 4upx;
				bottom: 0;
				left: 50%;
				transform: translateX(-50%);
				box-sizing: border-box;
				background-color: #ffe4e3;
				border-radius: 16upx;
				text-align: center;
				font-weight: 500;
			}
		}
	}
	.right-wrap {
		width: 334upx;
		.hot-goods {
			width: 100%;
			padding: 14upx 16upx 20upx;
			box-sizing: border-box;
			.top {
				.title {
					font-weight: 700;
				}
				.count-down {
					background-color: #ffd7de;
					image {
						width: 46upx;
						height: 36upx;
					}
					.num {
						font-size: 24upx !important;
						color: #f8352b;
						padding: 0 8upx;
						border-radius: 8upx;
						/deep/ .u-count-down {
							&__text {
								color: #f8352b !important;
								font-size: 24upx !important;
								line-height: unset !important;
							}
						}
					}
				}
			}
			.goods {
				margin-top: 10upx;
				.item {
					width: 126upx;
					height: 126upx;
					position: relative;
					image {
						width: 100%;
						height: 100%;
					}
					.price {
						position: absolute;
						bottom: 0;
						left: 50%;
						transform: translateX(-50%);
						font-size: 20upx;
						color: #f8352b;
						background-color: #ffe4e3;
						border-radius: 16upx;

						white-space: nowrap;
					}
				}
			}
		}

		.fruits {
			width: 100%;
			padding: 14upx 16upx 20upx;
			box-sizing: border-box;
			.title {
				font-weight: 700;
			}
			.sub {
				font-size: 28upx;
				margin-left: 10upx;
				color: #616161;
			}
			.goods {
				margin-top: 10upx;
				.item {
					width: 126upx;
					height: 126upx;
					position: relative;
					image {
						width: 100%;
						height: 100%;
					}
					.price {
						position: absolute;
						bottom: 0;
						left: 50%;
						transform: translateX(-50%);
						font-size: 20upx;
						color: #f8352b;
						background-color: #ffe4e3;
						border-radius: 16upx;

						white-space: nowrap;
					}
				}
			}
		}
	}
}
</style>
