<template>
	<view>
		<headContent statusBarBg="#191A2E" bgColor="#191A2E">

			<template #left>
				<reverse-back iconColor="#fff" />
			</template>
			<template #content>
				<view class="haed-title">
					{{ NewTitle }}
				</view>
			</template>
			<template #right>
				<closeIocn iconColor="#fff" />
			</template>
		</headContent>
		<view class="new-content" v-html="NewContent">
			
		</view>
	</view>
</template>

<script> 
	import {
		Api_getNewDetail
	} from "@/api/index.js"
	export default {
		name: 'article-details',
		data() {
			return {
				NewId: null,
				NewContent:'',
				NewTitle:''
			};
		},
		onLoad(opt) {
			this.NewId = opt?.id;
			this.getNewDetail()
		},
		mounted() {

		},
		methods: {
			getNewDetail() {
				if (this.NewId) {
					Api_getNewDetail({
						id: this.NewId
					}).then(res => {
						this.NewContent = res?.content;
						this.NewTitle = res?.title;
					})
				}
			}
		}
	}
</script>

<style lang="scss" scoped>
	.haed-title {
		color: #fff !important;
	}
	.new-content{
		padding: 0 $pages-padding 0;
	}
</style>