<template>
	<view>
		<view  class="content" v-html="content"></view>
		{{title}}
	</view>
</template>

<script>
	export default {
		data() {
			return {
				content:'',
				title:'',
				xy:''
			}
		},
		onLoad(e) {
			this.xy=e.xy
			if(e.xy=='yonghu'){
				this.title='服务协议'
			}else{
				this.title='隐私协议'
			}
		},
		onReady() {
			//新的标题
			uni.setNavigationBarTitle({
				title:this.title
			})
		},
		onShow() {
			// if(this.xy=='yonghu'){
			// 	this.memberAgreement()
			// }else{
			// 	this.memberPrivacy()
			// }
			
		},
		methods: {
			memberPrivacy(){
				this.$api.memberPrivacy().then(res=>{
					console.log(7,res);
					this.content=res.data.content
				})
			},
			memberAgreement(){
				this.$api.memberAgreement().then(res=>{
					console.log(7,res);
					this.content=res.data.content
				})
			}
		}
	}
</script>

<style scoped>
.content{
	padding: 20rpx;
}
</style>
