<template>
	<view class="question">
		<view class="public-view quest">
			<view class="title qt">Q:</view>
			<view class="qa">{{ item.question }}</view>
		</view>
		<view class="public-view answer">
			<view class="title at">A:</view>
			<view>
				<rich-text :nodes="nodes"></rich-text>
			</view>
		</view>
	</view>
</template>
<script>
import common from '@/static/js/common.js'
export default {
	data() {
		return {
			item: {},
			nodes: ''
		}
	},
	onLoad() {
		this.item = this.$store.state.question;
		console.log(this.item);
		this.nodes = common.unescapeHTML(this.item.answer);
	}
};
</script>
<style lang="scss" scoped>
.question {
	min-height: calc(100vh - var(--window-top));
	background: #FFFFFF;
	padding: 20rpx 30rpx;
	.public-view {
		display: flex;
		margin-bottom: 40rpx;
		.title {
			font-size: 36rpx;
			margin-right: 20rpx;
		}
		.at {
			color: #ff780f;
		}
		.qa {
			line-height: 36rpx;
		}
	}
}
</style>