<template>
	<view class="aall_box">
		<view style="padding:20rpx;">
			<view class="policy">
				<u-parse :content="policyC" :lazy-load="true" :show-with-animation="true"></u-parse>
			</view>
		</view>
	</view>
</template>


<script>
	import mineApi from '@/api/mine/index.js'
	export default {
		data() {
			return {
				primary: this.$theme.primary,
				policy: '',
				policyC: '',
				settingFile: getApp().globalData.siteinfo,
			};
		},
		methods: {
			getPolicy() {
				let that = this
				mineApi.fxindex().then(ret => {
					if (ret.status !=0) {
						that.policy = ret.data.phone;
						/* 处理富文本*/
						that.policyC = ret.data.fx_explain.replace(/\<img src="/gi,
							`<img style='width:100%;display:block' src="${that.settingFile.root_rich_img}`);
					} else {
						uni.showToast({
							title: ret.msg,
							icon: "none"
						});
					}
				})
			}
		},
		onShow() {
			this.getPolicy()
		}
	}
</script>

<style lang="scss">
	page {
		width: 100%;
		height: 100%;

	}

	.policy {
		width: 100%;
		height: 100%;
		background: #fff;
		font-size: 28rpx;
		color: rgba(102, 102, 102, 1);
	}
	.policy view.con {
		height: 84rpx;
		color: #333333;
	}
</style>
