<template>
	<!-- 新鲜事/话题列表 -->
	<view class="topic-list flex items-center" @click="goTopicDetail(item)">
		<image style="width: 200rpx; height: 140rpx;" :src="item.img" lazy-load mode="aspectFill"></image>
		<view class="my-20 flex-1">
			<view class="text-black text-32">#{{item.title}}#</view>
			<view class="text-gray-400 text-26 my-10">{{item.desc}}</view>
			<view class="text-gray-400 text-24 my-10 flex w-full">
				<view class="w-1-2 text-left">观看量：{{item.totalNum}}</view>
				<view class="w-1-2 text-left">今日：{{item.todayNum}}</view>
			</view>
		</view>
	</view>
</template>

<script>
	/*
	 * newsTopicList 新鲜事页话题列表
	 * @description 用于新鲜事页中话题栏下面的话题列表
	 * @author MrThinco
	 * @property {Object} item 信息
	 */
	export default {
		props: {
			item: {
				type: Object,
				default: () => ({})
			}
		},
		data() {
			return {

			}
		},
		methods: {
			// 话题详情
			goTopicDetail(item) {
				// this.$u.route({
				// 	url: '/pages/news/news-topic-detail',
				// 	params: item
				// })
				this.$u.route('pages/home/detail', {
					data: JSON.stringify({
						age: 30,
						commentNum: 388,
						coverPic: "/static/img/list/01.jpg",
						infoNum: {
							cryNum: 2,
							index: 0,
							smileNum: 13
						},
						isFollow: false,
						sex: 1,
						shareNum: 32,
						title: "做一件有价值的事情，坚持下去等待时间的回报吧！",
						type: "img",
						userPic: "/static/img/header/a.svg",
						username: "芒种"
					})
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.topic-list {
		background-color: #FFFFFF;
		margin-top: 20rpx;
		border-radius: 10rpx;
		padding:15rpx 10rpx;
		image {
			width: 150rpx;
			height: 150rpx;
			border-radius: 10rpx;
			margin-right: 20rpx;
		}
	}
</style>