<template>
	<view>
		<u-navbar bgColor="#ffffff" :placeholder="true" titleStyle="font-weight:600" title="通知公告" :autoBack="true">
		
		</u-navbar>
		<uni-card
			v-for="(item, index) in gonggao"
			:key="item.noticeId"
			:title="`${index + 1}.${item.noticeTitle}`"
			:sub-title="`创建人:${item.createBy}`"
			:extra="item.createTime"
			:thumbnail="avatar"
			@click="onClick"
		>
			<u-read-more :showHeight="200"><rich-text :nodes="item.noticeContent"></rich-text></u-read-more>
		</uni-card>
	</view>
</template>

<script>
import { listNotice } from '@/api/indexpage/user.js';
export default {
	data() {
		return { gonggao: [] };
	},
	onLoad() {
		this.getGongGao();
	},
	methods: {
		getGongGao() {
			// status: "0"
			listNotice({ status: '0' }).then(res => {
				this.gonggao = res.rows;
			});
		}
	}
};
</script>

<style lang="scss"></style>
