<template>
	<view class="content">
		<view class="list" v-for="(item, index) in listInfo" @click="navTo('/pages/index/ggDetail?id=' + item.id)">
			<view class="icon"><image src="../../static/img/gglist.png" mode=""></image></view>
			<view class="main">
				<view class="main-title">{{ item.title }}</view>
				<view class="main-info clamp2" v-html="item.content"></view>
				<view class="main-time">{{ item.addtime }}</view>
			</view>
		</view>
	</view>
</template>

<script>
import { gglist } from '@/api/index.js';
export default {
	data() {
		return {
			listInfo: []
		};
	},
	onLoad() {},
	onShow() {
		this.getgg();
	},
	methods: {
		getgg() {
			const obj = this;
			gglist({ page: 1, limit: 1000 }).then(e => {
				obj.listInfo = e.data;
			});
		},
		navTo(url) {
			uni.navigateTo({
				url
			});
		}
	}
};
</script>

<style lang="scss">
page,
.content {
	min-height: 100%;
	height: auto;
	background: #fff;
}
.list {
	margin-top: 20rpx;
	padding: 0 40rpx;
	display: flex;
	align-items: flex-start;
	.icon {
		padding-top: 10rpx;
		flex-shrink: 0;
		width: 68rpx;
		height: 50rpx;
		image {
			width: 100%;
			height: 100%;
		}
	}
	.main {
		margin-left: 10rpx;
		.main-title {
			font-size: 32rpx;
			color: #707a8a;
		}
		.main-info {
			color: #707a8a;
		}
		.main-time {
			font-size: 24rpx;
			color: #707a8a;
		}
	}
}
</style>
