<template>
	<view class="appraise-card">
		<view class="appraise-title">
			<view class="title">评价</view>
			<view class="comments">
				<view class="a-star">
					<zzx-icon name="star" size="10"></zzx-icon>
					<text>4.8</text>
				</view>
				<view class="a-text">| 37人评论</view>
			</view>
		</view>
		<view class="appraise-info" v-for="item in 5" @click="check_detail">
			<view class="a-user-info">
				<view class="info">
					<image src="https://img.keaitupian.cn/newupload/08/1629449018344288.jpg" mode=""></image>
					<view class="name">詹姆斯</view>
				</view>
				<view class="time">03-20</view>
			</view>
			<view class="a-score">
				<text>4.0</text>
				<uni-rate :readonly="true" size="16" :value="2" />
			</view>
			<view class="a-content">
				詹姆四对孩子很有耐心，也非常照顾小朋友的情绪，
				值得推荐！
			</view>
			<scroll-view class="scroll-view_H" scroll-x="true" :show-scrollbar="false">
				<view class="scroll-view-item_H uni-bg-red" v-for="item in 5">
					<image src="https://img.keaitupian.cn/newupload/08/1629449018344288.jpg" mode=""></image>
				</view>
			</scroll-view>
		</view>
	</view>
</template>

<script lang="ts" setup>
const check_detail=()=>{
	uni.navigateTo({
		url:'/pages/index/commentsDetail/index'
	})
}
</script>

<style lang="less" scoped>
	.appraise-card {
		padding: 20rpx;
		background: #FFFFFF;
		border-radius: 32rpx;
		margin-top: 20rpx;

		.appraise-title {
			display: flex;
			align-items: center;
			justify-content: space-between;

			.title {
				font-weight: 800;
				font-size: 32rpx;
				color: #222222;
			}

			.comments {
				display: flex;
				align-items: center;
				gap: 16rpx;

				.a-star {
					font-size: 24rpx;
					color: #FDD143;
				}

				.a-text {
					font-size: 24rpx;
					color: #AAAAAA;
				}
			}
		}

		.appraise-info {
			margin-top: 20rpx;

			.a-user-info {
				display: flex;
				align-items: center;
				justify-content: space-between;

				.info {
					display: flex;
					align-items: center;
					gap: 20rpx;

					&>image {
						width: 60rpx;
						height: 60rpx;
						border-radius: 50%;
					}

					.name {
						font-weight: bold;
						font-size: 24rpx;
						color: #222222;
					}
				}

				.time {
					font-size: 24rpx;
					color: #AAAAAA;
				}
			}

			.a-score {
				font-size: 24rpx;
				color: #AAAAAA;
				display: flex;
				align-items: center;
				gap: 20rpx;
				margin-top: 20rpx;
			}

			.a-content {
				margin-top: 20rpx;
				font-size: 28rpx;
				color: #222222;
			}

			.scroll-view_H {
				white-space: nowrap;
				width: 100%;
				height: 220rpx;
				margin-top: 20rpx;
				border-bottom: 1rpx solid #F0F0F0;
					.scroll-view-item_H {
						display: inline-block;
						text-align: center;
						margin-right: 14rpx;
						&>image{
							width: 202rpx;
							height: 200rpx;
							background: #D8D8D8;
							border-radius: 32rpx;
						}
					}
			}
		}
	}
</style>