<template>
	<view class="circle">
		<view @click="itemClick(item)" v-for="(item,index) in list" :key="index" class="circle-item">
			<view class="circle-item-top">
				<view class="circle-item-top-img">
					<image style="width: 100%;height: 100%;" :src="item.img" mode=""></image>
				</view>
				<view class="circle-item-top-text">
					<view class="circle-item-top-text-top">
						{{item.name}}
					</view>
					<view class="circle-item-top-text-bottom">
						{{item.stu}}
					</view>
				</view>
			</view>

			<view class="circle-item-content">
				{{item.content}}
			</view>

			<view class="circle-item-img">
				<view @click.stop="img(item,index1)"  :key="index1" v-for="(item1,index1) in item.imgArr " class="circle-item-img-dom">
					<image style="width: 100%;height: 100%;border-radius: 10rpx;" :src="item1" mode=""></image>
				</view>
			</view>

			<view class="circle-item-bottom">
				<view class="circle-item-bottom-left">
					<image style="width: 30rpx;height: 30rpx;margin-right: 10rpx;" src="@/static/image/date.png"
						mode=""></image> {{item.date}}
				</view>
				<view class="circle-item-bottom-right">
					<image style="width: 30rpx;height: 30rpx;margin-right: 10rpx;" src="@/static/image/review.png" mode=""></image>
					<text style="margin-right: 10rpx;">{{item.review}}</text>
					<uni-icons style="margin-right: 10rpx;" color="#999" type="heart	" size="16"></uni-icons>
					<uni-icons style="margin-right: 10rpx;" color="rgba(5,204,161,1)" type="heart-filled" size="16"></uni-icons>
					{{item.giveLike}}
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		name: "circleList",
		props: {
			list: {
				type: Array,
				default: () => []
			}
		},
		data() {
			return {

			};
		},
		methods: {
			img(item, index1) {
				uni.previewImage({
					urls: item.imgArr,
					current: index1, // 当前显示图片的http链接，默认是第一个
				})
			},
			itemClick(item){
				 this.$emit('itemClick',item)
			}
		}
	}
</script>

<style lang="scss" scoped>
	.circle {
		width: 100%;
		box-sizing: border-box;

		.circle-item {
			width: 100%;
			box-sizing: border-box;
			padding: 32rpx;
			background: #ffffff;
			border-radius: 5.33px;
			box-shadow: 0px 0px 6.67px 0px rgba(147, 147, 147, 0.20);
			margin-bottom: 32rpx;

			.circle-item-bottom {
				display: flex;
				justify-content: space-between;

				.circle-item-bottom-left {
					display: flex;
					align-items: center;
					color: #999;
				}

				.circle-item-bottom-right {
					display: flex;
					align-items: center;
					color: #999;
				}
			}

			.circle-item-img {
				display: flex;
				flex-wrap: wrap;

				.circle-item-img-dom {
					width: 190rpx;
					height: 190rpx;
					margin-right: 29rpx;
					margin-bottom: 29rpx;
				}

				.circle-item-img-dom:nth-child(3n) {
					margin-right: 0;
				}
			}

			.circle-item-content {
				padding: 24rpx 0;
			}

			.circle-item-top {
				display: flex;

				.circle-item-top-img {
					width: 100rpx;
					height: 100rpx;
					margin-right: 24rpx;

				}

				.circle-item-top-text {
					.circle-item-top-text-top {
						font-size: 32rpx;
						margin-bottom: 10rpx;
					}

					.circle-item-top-text-bottom {
						color: #999;
						font-size: 24rpx;
					}
				}
			}
		}
	}
</style>