<template>
	<div class="view">
		<div class="text">
			<div v-if="id==1">
				<u-parse :content="text" :selectable="true"></u-parse>
			</div>
			<div v-if="id==2">
				<u-parse :content="text" :selectable="true"></u-parse>
			</div>
		</div>
	</div>
</template>

<script>
	export default {
		data() {
			return {
				id: '',
				text: ''
			}
		},
		onLoad(id) {
			this.id = id.id
		},
		onShow() {
			this.$api.sendRequest({
				url: '/api/notice/info',
				data: {
					id: this.id
				},
				success: res => {
					console.log(res.data, 'res');
					this.text = res.data.content
				}
			});
		}
	}
</script>

<style lang="scss" scoped>
	.view {
		padding: 32rpx;

		.text {
			margin-top: 32rpx;
		}
	}
</style>