<template>
	<view class="policy-content">
		<view v-html="strings"></view>
	</view>
</template>

<script>
	import {getPolicyDetail} from '@/api/newIndex.js'
	export default {
		data() {
			return {
				strings:'',
				contentShow:false
			}
		},
		onLoad(option) {
			getPolicyDetail (option.id).then(res => {
			  let htmlString = res.data.data.guidelineContent
				this.strings = htmlString.replace(/width=\"\d+\" height=\"\d+\"/g, 'width="100%" height="auto"');
			})
		},
		methods: {
			percent2percent25 (URI)  {
			if(URI.indexOf('%') > -1) {
			return URI.replace(/%/g,'%25')
			}else{
			return URI;
			}
			},
		}
	}
</script>

<style>
	page{
		padding: 20px 20px 20px 20px;
		overflow: auto;
	}
	.policy-content>img {
		width: 100% !important;
		height: auto !important;
	}
</style>
