<template>
	<view>
		<status-nav :ifReturn="true" navBarTitle="免责声明" :marginBottom="0"></status-nav>
		<!-- 内容 -->
		<view class="disclaimers border-box" :style="{'min-height':disclaimersHeight}">
			<view class="disclaimers-txt font24 color-8c">
				<rich-text :nodes="disclaimers"></rich-text>
			</view>
		</view>
	</view>
</template>

<script>
	import {mapState} from 'vuex'//引入mapState
	export default {
		data() {
			return {
				disclaimersHeight: `calc(100vh - ${uni.getSystemInfoSync().statusBarHeight + 50}px)`,
				disclaimers:'',
			}
		},
		onLoad(op) {
			// 查询免责声明
			this.getDisclaimers();
		},
		methods: {
			// 查询免责声明
			getDisclaimers(){
				uni.showLoading({
					title:'加载中'
				});
				this.$requst.get('/api/v1/index/statement').then(res=>{
					if(res.code==0){
						this.disclaimers = this.$toolAll.tools.escape2Html(res.data.content);
					}
					uni.hideLoading();
				})
			}
		}
	}
</script>

<style scoped>
	.disclaimers{
		padding: 20rpx 30rpx;
	}
	.disclaimers-title{
		line-height: 1.5;
		margin-bottom: 30rpx;
		text-align: center;
	}
	.disclaimers-txt{
		line-height: 1.8;
		text-align: justify;
	}
</style>
