flying-monkey/pages/login/agreement.vue

43 lines
1.0 KiB
Vue

<template>
<view>
<status-nav :navBarTitle="title" returnColor="#c2c2c2"></status-nav>
<container-subgroup>
<view slot="content" style="margin: 0 -30rpx;" class="bacf">
<view class="pad30">
<rich-text :nodes="richText" class="fon24 line-h40 col6"></rich-text>
</view>
</view>
</container-subgroup>
</view>
</template>
<script>
export default {
data(){
return {
title:'',//标题
richText:''//富文本详情
}
},
onLoad(options) {
options.type*1 ? this.title = '飞猴隐私政策' : this.title = '飞猴用户服务协议';
this.checkAgreement(options.type);
},
methods:{
checkAgreement(type){
console.log(type,26);
let url = type*1 ? '/universal/api.login/register_privacy_agreement' : '/universal/api.login/register_user_agreement';
this.$requst.post(url).then(res=>{
if(res.code==1) {
this.richText = this.$toolAll.tools.escape2Html(res.data.protocol);
} else this.$toolAll.tools.showToast(res.msg);
})
}
}
}
</script>
<style>
</style>