<template>
	<view class="container">
		<view class="searchBox" :style="{ height: localHeight + 'px', paddingTop: top + 'px' }">
			<view class="searchBox_add">
				<u-icon bold color="#000" size="40" name="arrow-left" @click="back"></u-icon>
			</view>
		</view>


		<div class="Tit">{{Info.title}}</div>
		<div class="subTit">{{Info.author}} {{Info.publish_time}}</div>
		<div class="Con">
			<rich-text :nodes="Info.content"></rich-text>
		</div>

	</view>

</template>

<script>
	import {
		request,
		picUrl,
		uniqueByField,
		menuButtonInfo,
		NavgateTo
	} from '../../../utils';
import {
	apiArr
} from '../../../api/v2Community';


export default {
	data() {
		return {
			top: "",
			localHeight: "",
			id:"",
			Info:""
		}
	},
	onLoad(options) {
		const meun = menuButtonInfo();
		this.top = meun.top;
		// this.top = meun.height + meun.top;
		this.localHeight = meun.height;
		this.id = options.id
		this.getInfo()
	},


	methods: {
		//公告详情
		getInfo(){
			request(apiArr.getAnnounceInfo,"POST",{
				id:Number(this.id)
			}).then(res=>{
				console.log(res);
				this.Info = res
			})
		},
		back() {
			uni.navigateBack({
				delta: 1
			});
		},
	},


}
</script>

<style>
@import url("./index.css");
</style>