<template>
	<view class="container">
		<!-- 评价信息区域 -->
		<view class="header">
			<!-- 用户信息区域 -->
			<view class="header_info">
				<img mode="aspectFill" src="https://img1.baidu.com/it/u=4085584268,3308739054&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=375" />
				<view class="info_msg">
					<view class="msg_name">张三</view>
					<view class="msg_star">
						<uni-rate readonly activeColor="#FFC300" :size="16" :value="4" />
					</view>
				</view>
				<view class="info_time">2023/07/25</view>
			</view>

			<!-- 入住时间区域 -->
			<view class="header_time">2023-07入住，2023-08-01发表 | 大床房</view>

			<!-- 评价内容区域 -->
			<view class="header_content">评价内容评价内容评价内容评价内容评价内容评价内容评价内容评价内容评价内容评价内容评价内容评价内容的丰富的丰富</view>

			<!-- 图片列表区域 -->
			<view class="header_img">
				<img mode="aspectFill" src="https://img1.baidu.com/it/u=4085584268,3308739054&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=375" />
				<img mode="aspectFill" src="https://img1.baidu.com/it/u=4085584268,3308739054&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=375" />
				<img mode="aspectFill" src="https://img1.baidu.com/it/u=4085584268,3308739054&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=375" />
				<img mode="aspectFill" src="https://img1.baidu.com/it/u=4085584268,3308739054&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=375" />
			</view>
		</view>

		<!-- 民宿信息区域 -->
		<view class="hotel">
			<img mode="aspectFill" src="https://img1.baidu.com/it/u=4085584268,3308739054&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=375" />
			<view class="hotel_info">
				<view class="info_name">民宿名称</view>
				<view class="info_star">
					<uni-rate readonly activeColor="#FFC300" :size="12" :value="4" />
					<view class="star_num">4.0</view>
				</view>
				<view class="info_tags">
					<view class="tag_item">双溪镇</view>
					<view class="tag_item">包吃住型</view>
				</view>
			</view>
		</view>

		<!-- 评论回复区域 -->
		<view class="reply">
			<!-- 评论总条数区域 -->
			<view class="reply_title">
				<img src="../../static/index/comment.png" />
				评论(24)
			</view>

			<!-- 评论列表区域 -->
			<view class="reply_box">
				<!-- 每一条评论区域 -->
				<view class="box_item">
					<!-- 用户区域 -->
					<view class="item_user">
						<img mode="aspectFill" src="https://img1.baidu.com/it/u=4085584268,3308739054&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=375" />
						<view class="user_info">
							<view class="info_top">张三</view>
							<view class="info_bottom">2023/05/25</view>
						</view>
					</view>
					<!-- 评价内容区域 -->
					<view class="item_content">评价内容评价内容评价内容评价内容评价内容评价内容评价内容评价内容评价内容评价内容评价内容评价内容的丰富的丰富</view>
				</view>

				<view class="box_item">
					<!-- 用户区域 -->
					<view class="item_user">
						<img mode="aspectFill" src="https://img1.baidu.com/it/u=4085584268,3308739054&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=375" />
						<view class="user_info">
							<view class="info_top">商家</view>
							<view class="info_bottom">2023/05/25</view>
						</view>
					</view>
					<!-- 评价内容区域 -->
					<view class="item_content">
						<text class="content_key">回复张三：</text>
						评价内容评价内容评价内容评价内容评价内容评价内容评价内容评价内容评价内容评价内容评价内容评价内容的丰富的丰富
					</view>
				</view>
			</view>

			<!-- 输入框区域 -->
			<view class="reply_input">
				<input type="text" placeholder="说点什么吧..." />
			</view>
		</view>
	</view>
</template>

<script>
export default {
	data() {
		return {
			// 评价详情信息
			info: {}
		}
	},
	onLoad(options) {
		// this.info = JSON.parse(decodeURIComponent(options.info))
		// console.log(this.info)
	}
}
</script>

<style lang="scss" scoped>
.container {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
	background-color: #f2f3f5;

	.header {
		margin-top: 1rpx;
		padding: 0 20rpx;
		background-color: #fff;

		.header_info {
			display: flex;
			align-items: center;
			height: 115rpx;

			img {
				width: 70rpx;
				height: 70rpx;
				border-radius: 50%;
			}

			.info_msg {
				margin-left: 18rpx;

				.msg_name {
					font-size: 28rpx;
				}

				.msg_star {
					margin-left: -5rpx;
					margin-top: 5rpx;
				}
			}

			.info_time {
				margin-top: 25rpx;
				margin-left: auto;
				color: #a6a6a6;
				font-size: 24rpx;
			}
		}

		.header_time {
			color: #a6a6a6;
			font-size: 24rpx;
		}

		.header_content {
			margin-top: 18rpx;
			font-size: 24rpx;
		}

		.header_img {
			display: grid;
			grid-template-columns: 1fr 1fr 1fr;
			grid-auto-rows: auto;
			padding: 20rpx 20rpx 40rpx;
			gap: 10rpx;

			img {
				width: 216rpx;
				height: 216rpx;
				border-radius: 20rpx;
			}
		}
	}

	.hotel {
		display: flex;
		align-items: center;
		margin-top: 20rpx;
		height: 160rpx;
		background-color: #fff;

		img {
			margin-left: 20rpx;
			width: 120rpx;
			height: 120rpx;
			border-radius: 7rpx;
		}

		.hotel_info {
			display: flex;
			flex-direction: column;
			justify-content: space-between;
			margin-left: 20rpx;
			height: 120rpx;

			.info_name {
				font-size: 32rpx;
			}
			.info_star {
				display: flex;
				align-items: center;

				.star_num {
					margin-left: 10rpx;
					color: #ffc300;
					font-size: 24rpx;
				}
			}

			.info_tags {
				display: flex;
				color: #a6a6a6;
				font-size: 24rpx;

				.tag_item {
					margin-right: 20rpx;
				}
			}
		}
	}

	.reply {
		margin-top: 20rpx;
		background-color: #fff;

		.reply_title {
			display: flex;
			justify-content: flex-end;
			align-items: center;
			padding-right: 35rpx;
			height: 90rpx;
			font-size: 24rpx;
			border-bottom: 1rpx solid #e6e6e6;

			img {
				margin-right: 12rpx;
				width: 25rpx;
				height: 21rpx;
			}
		}

		.reply_box {
			padding: 0 20rpx 30rpx;

			.box_item {
				margin-bottom: 10rpx;

				.item_user {
					display: flex;
					align-items: center;
					height: 120rpx;

					img {
						width: 70rpx;
						height: 70rpx;
						border-radius: 50%;
					}

					.user_info {
						display: flex;
						flex-direction: column;
						justify-content: space-between;
						margin-left: 18rpx;
						height: 70rpx;

						.info_top {
							font-size: 28rpx;
						}
						.info_bottom {
							color: #a6a6a6;
							font-size: 24rpx;
						}
					}
				}

				.item_content {
					font-size: 24rpx;

					.content_key {
						color: #808080;
					}
				}
			}
		}

		.reply_input {
			display: flex;
			align-items: center;
			box-sizing: border-box;
			padding: 0 33rpx;
			margin: 54rpx auto;
			width: 710rpx;
			height: 78rpx;
			font-size: 24rpx;
			border-radius: 44rpx;
			background-color: #e6e6e6;

			input {
				width: 100%;
			}
		}
	}
}
</style>
