<template>
	<view class="content">
		 <view v-html="ulrtext" style="padding-top: 20rpx;"></view>
	</view>
</template>

<script>
 import {getyingsi,getxieyi} from '@/api/user.js'
 export default {
 	data() {
 		return {
			type:"",
			ulrtext:''
 		}
 	},
	onLoad(option) {
		if(option.type==1){
			//协议
			uni.setNavigationBarTitle({
				title: "用户协议"
			  });
			this.getgetxieyilist()
		}else{
			//隐私
			uni.setNavigationBarTitle({
				title: "隐私保护"
			  });
			this.getyingsilist()
		}
		console.log(this.type)
	},
 	 methods:{
		 getyingsilist(){
			 getyingsi().then(res=>{
				 this.ulrtext=res
			 })
		 },
		 getgetxieyilist(){
			 getxieyi().then(res=>{
				 this.ulrtext=res
			 })
		 }
	 }
 }
 
 
</script>


<style scoped lang="scss">
.content{
	padding: 20rpx;
	padding-bottom: 60rpx;
}
 

</style>
