<template>
	<view style="padding: 30rpx;">
		<view style="font-size:34rpx;">{{articleItem.title}}</view>
		<view style="height: 20rpx;"></view>
		<view style="color: #999;font-size: 30rpx;">发布时间：{{articleItem.created_at}}</view>
		<view style="height: 20rpx;"></view>
		<video v-if="articleItem.video" style="width: 690rpx;height:388rpx" :poster="articleItem.cover" :src="articleItem.video" :direction="90">
		</video>
		<view style="height: 20rpx;"></view>
		<view>
			<!-- <zero-markdown-view :markdown="articleItem.note"></zero-markdown-view> -->
			<mp-html :content="articleItem.note" />
			<!-- <u-parse :content="articleItem.note"></u-parse> -->
		</view>
		<view style="50rpx"></view>
	</view>
</template>

<script>
	let self;
	import {
		getUser,
		setUser
	} from '@/com/storage/auth.js';
	export default {
		data() {
			return {
				articleItem: {
					id: '',
					title: '',
					cover: '',
					note: '',
					created_at: '',
				},
				search: {
					id: ''
				}
			}
		},
		onLoad(option) {
			self = this;
			if (option && option.id) {
				self.search.id = option.id;
			}
		},
		onShow() {
			self.getArticleItem();
		},
		methods: {
			getArticleItem() {
				self.$http.get('/shop/v10/article/item', self.search).then(({
					data,
					success
				}) => {
					if (success) {
						self.articleItem = data;
					}
				})
			},
		}
	}
</script>

<style>

</style>