<template>
	<view class="container">
		<view class="box">
			<view class="imgBox" v-for="(item, index) in dataList" :key="index">
				<image class="imgs" mode="scaleToFill" :src="filesUrl + item.blogPic"></image>
				<text class="name">张曦汐</text>
			</view>
		</view>
	</view>
</template>

<script>
	import request from '../../api/cms.js';
	import { BASE_URL } from '../../env.js';
	export default {
		data() {
			return {
				filesUrl: BASE_URL.fileUrl,
				dataList: []
			}
		},
		onShow: function() {},
		async mounted() {
			this.getPolicyList({ typeName: 'policy' });
		},
		methods: {
			// 列表点击函数
			listItemBtn(e) {
				return;
				uni.navigateTo({ url: `/pages/details/index?id=${e.id}` })
			},
			// 搜索函数
			async getPolicyList(e) {
				const res = await request.getArticleList({ pageNum: 1, pageSize: 100, typeName: 'hgjfc' });
				this.dataList = res.rows;
			}
		}
	}
</script>

<style>
	.container {
		width: 100%;
		height: 100vh;
		overflow-y: auto;
		background-color: darkred;
	}
	.box {
		display: flex;
		flex-wrap: wrap;
	}
	.imgBox {
		width: 30%;
		height: 36vw;
		margin-left: 2.5%;
		margin-top: 20px;
	}
	.imgs {
		display: block;
		width: 100%;
		height: 90%;
	}
	.name {
		width: 100%;
		display: block;
		text-align: center;
		color: #fff;
	}
</style>
