<template>
	<view class="helpDetails">
		<far-bottom></far-bottom>
		<!-- 标题 -->
		<view class="detailsTitle">
			<view class="detailsTitlePackage">
				<span>{{ detailInfo.title }}</span>
			</view>
		</view>
		<!-- 标题 -->

		<!-- 内容区域 -->
		<scroll-view class="scollView" :scroll-x="true" :scroll-y="true" :style="{ height: phoneHight }">
			<view class="detailsMain"><view class="detailsMainPackage" >
			<jyf-parser :html="detailInfo.content"></jyf-parser>
			</view></view>
		</scroll-view>
		<!-- 内容区域 -->
	</view>
</template>

<script>
import App from '@/common/js/app.js';
import jyfParser from '@/components/jyf-parser/jyf-parser.vue'

// #ifdef H5
import wxApi from '@/common/js/wxApi.js';
// #endif

export default {
	data() {
		return {
			detailInfo: {},
			phoneHight: 0,
			titleHeight: 0
		};
	},
	onLoad(e) {
		let _this = this;
		_this.id = e.id;
		_this.init();
	},
	mounted() {
		let _this = this;
		uni.createSelectorQuery()
			.select('.detailsTitle')
			.boundingClientRect(data => {
				_this.titleHeight = data.height;
			})
			.exec();
		uni.getSystemInfo({
			success(res) {
				_this.phoneHight = res.windowHeight - _this.titleHeight + 'px';
			}
		});
	},
	methods: {
		init() {
			let _this = this;
			_this.getDetailInfo();
		},
		// 获取问题的详细信息
		getDetailInfo() {
			let _this = this;
			let data = {
				id: _this.id
			};
			App._post_form('&p=helper&do=detail', data, res => {
				_this.detailInfo = res.data;
			});
		}
	}
};
</script>

<style lang="less" scoped>
/deep/.uni-scroll-view::-webkit-scrollbar {
	width: 0;
	height: 0;
}
.scollView {
	padding: 0 30upx;
	width: 690upx;
}
.helpDetails {
	font-size: 0;
	overflow-x: scroll;
}
page {
	background: #FFFFFF;
}
.detailsMainPackage {
	padding: 30upx 0;
	font-size: 24upx;
	
	
	color: rgba(153, 153, 153, 1);
}
.detailsTitlePackage {
	margin: 0 30upx;
	border-bottom: 1upx solid rgba(239, 240, 254, 1);
	> span {
		line-height: 105upx;
		font-size: 30upx;
		
		font-weight: bold;
		color: rgba(51, 51, 51, 1);
	}
}
.detailsTitle {
	height: 105upx;
}
</style>
