<template>
	<view class="container" style="margin: 10rpx 0;">
		<view @tap="onDetails">
			<view class="flex-y-center mb-20">
				<image class="type-image mr-20" :src="`/static/img/ic-wall-type-${itemInfo.type}.png`" mode=""></image>
				<view>
					<view class="info-dzi mb-10 fs-24">Lalala·北京大学</view>
					<view class="info-xzi">
						<text>98楼</text>
						<text>3-23 13:22:04</text>
					</view>
				</view>
			</view>
			<view class="info-dzi f-s-22 f-w-300 mb-20">
				有没有一起玩吃鸡手游的🙋🏻‍♀️🙋🏻‍♀️，我是新手得多多包涵，找个有耐心，不嫌我菜的温柔男生。
			</view>
		</view>
		<view class="flex-y-center">
			<view @tap="onDetails">
				<text class='iconfont icon-dianzan' style="font-size: 24rpx;margin-right: 10rpx;"></text>
				<text class="info-xzi f-s-22">124</text>
			</view>
			<view @tap="onLikes" class="ml-38">
				<text class='iconfont icon-dizhixinxi ' style="font-size: 24rpx;margin-right: 10rpx;"></text>
				<text class="info-xzi f-s-22">16</text>
			</view>
		</view>
		<wall-reply ref="replyRef"></wall-reply>
	</view>
</template>

<script>
	import wallReply from './wall_reply.vue'
	let app = getApp();
	export default {
		components: {
			wallReply
		},
		props: {
			itemInfo: {
				type: Object,
				default: {}
			},
			onUrl: {
				type: Boolean,
				default: true
			}
		},
		data() {
			return {}
		},
		onLoad(options) {},
		onShow() {

		},
		methods: {
			onDetails() {
				if (this.onUrl) {
					uni.navigateTo({
						url: `/pages/confession_wall/wall_details_info/index`
					})
				} else {
					this.$refs.replyRef.visible = true; // 调用子组件的方法显示对话框
				}
			},
			onLikes() {
				console.log('点赞')
			}
		},
		mounted() {

		},
	}
</script>

<style scoped lang="scss">
	.container {
		overflow: hidden;
		position: relative;
		background-color: #fff;
		border-radius: 23rpx;
		padding: 20rpx;
	}

	.info-xzi {
		font-weight: 400;
		font-size: 19rpx;
		color: #999999;
	}

	.info-dzi {
		font-weight: 500;
		font-size: 23rpx;
		color: #141414;
	}

	.type-image {
		width: 58rpx;
		height: 58rpx;
	}
</style>
