<script setup>
	import {
		ref
	} from "vue";

	import {
		onLoad,
	} from "@dcloudio/uni-app";

	import {
		getPolicyDetail,
	} from "@/api/work/policy.js";

	let title = ref(null);
	let content = ref(null);
	const getContent = function(id) {
		getPolicyDetail({
			id
		}).then(res => {
			content.value = res.data.content;
		})
	}

	onLoad(options => {
		title.value = options.title;
		getContent(options.id);
	})
</script>

<template>
	<view class="container">
		<page-title>详情</page-title>

		<view class="cards-list">
			<view class="card only-card">
				<view class="card-item first-card-item">
					<view class="card-item-announcement-detail">文件名：{{title}}</view>
				</view>
			</view>

			<view class="card">
				<view class="card-item" style="padding-top: 40rpx;margin-bottom: 40rpx;">
					<view class="card-item-announcement">详情内容：</view>
				</view>

				<view class="card-parse">
					<u-parse :content="content"></u-parse>
				</view>
			</view>
		</view>
	</view>
</template>

<style lang="scss" scoped>
	.card {
		min-height: 0;
	}
</style>