<template>
	<h-dark title=""></h-dark>
	<view class="bg-[#4E55AF] px-[30rpx] pb-[30rpx] pt-[10rpx]">
		<view class="mb-[30rpx]">
			<view class="text-2xl font-bold leading-normal">{{ newsData.title }}</view>
		</view>
	</view>
	<view class="px-[24rpx] py-[20rpx]">
	
		<view class="">
			<view class="leading-loose" v-html="newsData.content">
			</view>
		</view>
	</view>
</template>

<script lang="ts" setup>
	import { ref } from 'vue'
	import { onLoad } from '@dcloudio/uni-app'
	import { getArticleDetail } from '@/api/news'
	
	const newsData = ref<any>({})
	let newsId = ''

	const getData = async (id) => {
		newsData.value = await getArticleDetail({ id })
	}


	onLoad((options : any) => {
		newsId = options.id
		getData(newsId)
	})
</script>

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