<template>
	<view>
		<!-- #ifdef H5 -->
		<view style="color: #fff;">
			<tn-nav-bar :bottomShadow="false" backgroundColor="#26B3A0">{{title}}</tn-nav-bar>
			<view :style="{height: tobheight+'px'}"></view>
		</view>
		<!-- #endif  -->
		<view class="gy">
			<!-- <u-parse :content="content"></u-parse> -->

			<textarea :value="content" name="" id="" cols="999999" rows="999999" auto-height disabled></textarea>
		</view>
		<!-- <wike-loading-page :isLoading="isLoading"></wike-loading-page> -->
	</view>
</template>

<script>
	import {
		sysParms
	} from '@/api/my/index.js'
	export default {
		data() {
			return {
				content: '',
				type: '',
				title: '',
				tobheight: 45,
				platform: this.$platform.get(),
				isLoading: true
			}
		},
		computed: {

		},
		async onLoad(e) {
			let res = await sysParms({

			})
			console.log('系统参数返回值', res, res.msg);
			if (res.code == 0) {
				if (e.type == 'privacy') {
					this.content = res.data[1].value
				} else if (e.type == 'aboutus') {
					this.content = res.data[2].value
				} else {
					this.content = res.data[0].value
				}
			}

			if (e && e.type) {
				this.type = e.type

				if (e.type == 'privacy') {
					uni.setNavigationBarTitle({
						title: '隐私政策'
					})

				} else {
					uni.setNavigationBarTitle({
						title: '用户协议'
					})
				}

				this.title = e.type == 'privacy' ? '隐私政策' : e.type == 'aboutus' ? '关于我们' : '用户协议'

				// this.privacyabout()
			}

		},
		methods: {
			privacyabout() {
				// this.content = this.type == 'privacy' ? '隐私政策隐私政策隐私政策隐私政策隐私政策隐私政策' : this.type == 'aboutus' ? res
				// 	.data.aboutus : '用户协议用户协议用户协议用户协议用户协议用户协议用户协议用户协议'
				this.isLoading = false

				// this.$http('conf.getGroupConf', {
				// 	group: 'system.agreement'
				// }).then(res => {
				// 	if (res.code == 0) {
				// 		uni.setNavigationBarTitle({
				// 			title: this.appInfo.site_name
				// 		})
				// 		this.content = this.type == 'privacy' ? res.data.privacy : this.type == 'aboutus' ? res
				// 			.data.aboutus : res.data.use
				// 		this.isLoading = false
				// 	}
				// })
			}
		}
	}
</script>

<style lang="scss">
	textarea {
		width: 100%;
	}

	.gy {
		margin: 30rpx;
	}
</style>