<template>
	<view class="page   flex-col" :style="{'height':height}">
		<scroll-view scroll-y="true" class="scroll-y" >
			<view class="content-box  flex-col">
<!--				<web-view  src="http://www.gzqcdj.cn/doc/2.html"></web-view>-->
				<rich-text v-html="article.content">
				</rich-text>
			</view>
		</scroll-view>
	</view>
</template>

<script>
	import {getArticle} from '@/api/groupon.js'
	export default {
		data() {
			return {
				height:"",
				article:{}
			};
		},
		created(){
			let sysInfo=uni.getSystemInfoSync();
			this.height= sysInfo.windowHeight - sysInfo.windowBottom +'px';
			console.log("获取到的高度",this.height)
		},

		onLoad(e){
			console.log(e)
			this.getArticle(e.id);
		},
		methods: {
			getArticle(id){
				console.log(id)
				getArticle(id).then(res =>{
					this.article = res.data
					uni.setNavigationBarTitle({
						title: res.data.title
					});
				})

			},

		},
	};
</script>

<style scoped lang="scss">
	@import '/static/css/common.css';
	@import './index.rpx.css';

</style>
