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

<script>
	export default {
		data() {
			return {
				content: "",
				type: ""
			};
		},
		onLoad(o) {
			this.type = o.type;
			this.getInfo();
		},
		methods: {
			async getInfo() {
				const { code,data } = await this.$api.getConfigData({dictType: this.type});
				if(code == 200){
					this.content = data.content.replace(/style=""/g, '')
								.replace(/<img " src=/g, '<img src=')
								.replace(/<img src=/g, '<img style="width: 100%; height:100%; display:block" src=');
					uni.setNavigationBarTitle({
						title: data.title
					})
				}
			},
		}
	}
</script>

<style scoped lang="scss">
.content{
	padding: 25rpx;
	overflow: hidden;
	font-size: 28rpx;
	color: #333;
}
</style>
