<template>
	<view :style="'background-color: '+theme.bg+';color: '+theme.text" style="height: 100vh;">
		<myNav :title="i18n.notice.title2"></myNav>
		<!-- 身体 -->
		<view class="width-750 padding-w-30 padding-t-36 padding-b-40">
			<view class="font-28 weight-bold">{{data.title}}</view>
			<view class="font-24 color-C3C3C3 nummedium-font margin-t-5">{{data.createtime}}</view>
			<view class="margin-t-16" v-html="data.content"></view>
		</view>


	</view>
</template>

<script>
	export default {
		data() {
			return {
				statusBar: uni.getSystemInfoSync().statusBarHeight,
				id: '',
				data:'',
				theme: '',
			}
		},
		computed: {
			i18n() {
				return this.$t('message');
			}
		},
		onLoad(e) {
			this.id = e.id
			this.getDetails()
		},
		onShow() {
			if (uni.getStorageSync("theme") == "dark") {
				this.theme = this.$store.state.darkTheme
			} else {
				this.theme = this.$store.state.lightTheme
			}
		},
		methods: {
			getDetails() {
				this.post('/index/message_con', {
					id: this.id
				}).then(res => {
					console.log('公告详情', res)
					if (res.code == 1) {
						this.data = res.data
					}
				})
			},
		}
	}
</script>

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