<template>
	<view >
		 <!-- <web-view :src="webUrl"></web-view> -->
		 <view v-html="contText"></view>
	</view>
</template>

<script>
 import {getuserAgreement,getprivacyPolicy} from'@/api/common.js'
 export default {
 	data() {
 		return {
			webUrl:"",
			contText:''
 		}
 	},
	onLoad(option) {
		this.webUrl=uni.getStorageSync('url');
		console.log(this.webUrl)
		if(option.val==1){
			this.getuserAgreements()
		}else{
			this.getprivacyPolicys()
		}
	},
 	 methods:{
		 getuserAgreements(){
			 getuserAgreement().then(res=>{
				 console.log(res)
				 if(res.code==200){
					 this.contText=res.data
				 }else{
					 uni.showToast({
					 	title: res.msg,
					 	icon: 'none'
					 });
				 }
			 })
		 },
		 getprivacyPolicys(){
			 getprivacyPolicy().then(res=>{
				 console.log(res)
				 if(res.code==200){
					 this.contText=res.data
				 }else{
					 uni.showToast({
						title: res.msg,
						icon: 'none'
					 });
				 }
			 })
		 }
	 }
 }
 
 
</script>


<style scoped lang="scss">
page{
	height: 100%;
}
.content{
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	
}
 

</style>
