<template>
	<view class="content">
		<view class="c-comments-card">
			<view class="c-obj">观山湖区第十二小学</view>
			<view class="c-line"></view>
			<view class="c-user-info">
				<view class="user-info">
					<image class="header" src="https://img.shetu66.com/2023/06/13/1686646672844195.jpg" mode=""></image>
					<view class="name">张三</view>
				</view>
				<view class="time">03-20</view>
			</view>
			<view class="c-star">
				<view class="">4.0</view>
				<uni-rate :readonly="true" size="16" :value="2" />
			</view>
			<view class="c-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,index) in imgs">
					<image @click="check_img" :src="item" mode="">
					</image>
				</view>
			</scroll-view>
		</view>
	</view>
</template>

<script lang="ts" setup>
	import { ref } from 'vue';
	const imgs=ref([
		'https://img.keaitupian.cn/newupload/08/1629449018344288.jpg',
		'https://img.keaitupian.cn/newupload/08/1629449018344288.jpg',
		'https://img.keaitupian.cn/newupload/08/1629449018344288.jpg',
		'https://img.keaitupian.cn/newupload/08/1629449018344288.jpg',
	])
	const check_img = () => {
		uni.previewImage({
			urls:imgs.value,
			current: 'https://img.keaitupian.cn/newupload/08/1629449018344288.jpg'
		})
	}
</script>

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

		.c-obj {
			font-weight: bold;
			font-size: 32rpx;
			color: #222222;
		}

		.c-line {
			margin-top: 20rpx;
			border: 1rpx solid #F0F0F0;
		}

		.c-user-info {
			margin-top: 20rpx;
			display: flex;
			align-items: center;
			justify-content: space-between;

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

				.header {
					width: 60rpx;
					height: 60rpx;
					border-radius: 50%;
				}

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

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

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

		.c-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>