<template>
	<view >
		<view class="se-flex se-bgc-white se-m-20 se-p-20 se-br-20" v-for="(items,indexs) in list" :key="indexs" @click="onDetail(items)">
			<image class="se-w-240 se-h-180 se-br-20" :src="items.image" mode=""></image>
			<view class="se-flex se-flex-v se-flex-1 se-px-20">
				<view class="se-c-black se-fw-6 se-fs-28 se-toe-1 se-pt-5">
					{{items.title}}
				</view>
				<view class="se-c-33 se-fs-24 se-lh-40 se-toe-3 se-pt-10">
					{{items.description}}
					<!-- <u-parse :content="items.content"></u-parse> -->
					<!-- 我国将加快改善农村生活条件我国将加快改善农村生活条件我国将加快改善农村生活条件我国将加快改善农村生活条件我国将加快改善农村生活条件我国将加快改善农村生活条件 -->
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import { queryNewsList } from "@/common/api.js"
	export default{
		data(){
			return{
				pageNo:1,
				pageSize:10,
				list:[]
			}
		},
		onLoad(options) {
			this.onPageList()
		},
		onPullDownRefresh() {
			let that = this
			that.pageNo =  1
			that.list = []
			that.onPageList()
		},
		onReachBottom() {
			let that = this
			that.pageNo = that.pageNo + 1
			that.onPageList()
		},
		methods:{
			onDetail(event){
				uni.navigateTo({
					url:"/pages_subpack/news/detail?id="+event.id
				})
			},
			onPageList(){
				let that = this
				let params={
					pageNo:that.pageNo,
					pageSize:that.pageSize
				}
				queryNewsList(params).then((response) => {
					console.info('queryNewsList',response)
					that.list = that.list.concat(response.result.records) 
				}).catch((error) =>{
					
				})
			},
		}
	}
</script>

<style>
	page{
		background-color: #f5f5f5;
	}
</style>