<template>
	<view class="app-container">
		<view class="content">
			<u-parse :content="content"></u-parse>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				type: 1,
				content: '',
			}
		},
		onLoad({type}) {
			this.type = type;
			uni.setNavigationBarTitle({
			　　title: type == 1 ? '用户协议':'隐私声明'
			})
			
			this.getDetail();
		},
		methods: {
			getDetail() {
				this.$axios({
					url: '/common/wechat/detail',
					method: 'get',
					params: {},
					isLoading: 1
				}).then(res => {
					if(this.type == 1) {
						this.content = res.data.adminCompanyWechatOther.userAgreementContent;
					}else {
						this.content = res.data.adminCompanyWechatOther.privacyStatementContent;
					}
				})
			},
		}
	}
</script>

<style lang="scss">
	.app-container {
		background: #ffffff;
		padding: 0 30rpx;
		box-sizing: border-box;
	}
	.content {
		image {
			width: 100%;
		}
	}
</style>
