<template>
	<view style="background-color: #fff;">
		<u-navbar :title="newsDetail.title"></u-navbar>
		<view class="main">
			
			
			<view class="news-content" v-html="newsDetail.value">
				 
			</view>
		</view>
	</view>
</template>

<script>
	import * as newsApi from '@/apis/news.js'
	
	export default {
		data() {
			return {
				id: '',
				newsDetail: '',
			}
		},
		onLoad(op) {
			this.id =op.code;
			
			this.getNewsInfoDetail();
		},
		methods: {
			getNewsInfoDetail() {
				uni.showLoading({
					title: "加载中",
					mask: true,
				})
				
				newsApi.findConfigureByKey({
					key:this.id
				}).then((res) => {
					uni.hideLoading()					
					this.newsDetail = res.data;
				}).catch(error => {
					uni.showToast({
						title: error,
						icon: "none"
					})
				})
			}
		}
	}	
</script>

<style lang="scss" scoped>
	.main{
		
		margin: 0px 16px ;
		padding-bottom: 34px;
		.new-title{
			color: #101010;
			font-size: 18px;
			height: 48px;
			margin: 16px 0 35px;
		}
		.time{
			display: flex;
			justify-content: space-between;
			color: #888888;
			.num{
				margin-left: 4px;
			}
			
		}
		.news-content{
			margin-top: 13px;
			font-size: 14px;
			line-height: 28px;
			color: #101010;
		}
	}
</style>