<template>
	<view class="container">
		<view class="notice-item">
			<jyf-parser :html="description" ref="article"></jyf-parser>
		</view>
	</view>
</template>

<script>
	import {
		weixindata
	} from '@/utils/wxAuthorized.js';
	import {
		details,
		deconstructArticle
	} from '@/api/info.js';
	import jyfParser from "@/components/jyf-parser/jyf-parser.vue";
	export default {
		components: {
			jyfParser
		},
		data() {
			return {
				id: '',
				list: "",
				description: '',
				type: 0,

			}
		},
		onLoad(option) {
			this.id = option.id;
			this.loadData();
		},
		methods: {
			IndexShare() {

			},
			loadData() {
				let obj = this;
				details({
					id: obj.id
				}).then(function(e) {
					obj.list = e.data;
					if (obj.list.content != null) {
						obj.description = obj.list.content.replace(/<img/g,
							"<img style='max-width:100%;height:auto;'");
					} //小程序商品详情图超出屏幕问题、
					uni.setNavigationBarTitle({
						title: obj.list.title
					})
					let item = {
						link: obj.$store.state.baseURL + '/index/#/pages/applic/info?id=' + obj.id, // 分享链接
						imgUrl: obj.$store.state.baseURL + '/index/static/img/002.png',
						desc: obj.list.title,
						title: '荆州市红十字会',
						success: console.log('分享加载成功')
					};
					console.log('分享加', item);
					weixindata(item);
				});
			}
		}
	}
</script>

<style lang="scss">
	page {
		min-height: 100%;
		background: #FFFFFF;
	}

	.notice_name {
		font-size: 35rpx !important;
		color: #303133;
		padding: 25rpx 25rpx 0rpx 25rpx;
		margin-bottom: 25rpx;
	}

	.course-video {
		width: 100%;
		height: 500rpx;
	}

	.notice-item {
		width: 100%;
		height: 100%;
		color: #666666;
		padding: 35rpx 35rpx;
		font-size: 23rpx;
		padding-bottom: 30rpx;
	}
</style>
