You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

202 lines
4.9 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<template>
<view class="page">
<view class="info">
<!-- 标题 -->
<!-- <view class="info-title">
{{title}}
</view> -->
<!-- 内容 -->
<view class="info-content">
<mp-html v-if="id==1" :content="html1" :markdown="true" :lazy-load="true"/>
<mp-html v-if="id==2" :content="html2" :markdown="true" :lazy-load="true"/>
<mp-html v-if="id==3" :content="html3" :markdown="true" :lazy-load="true"/>
<mp-html v-if="id==4" :content="html4" :markdown="true" :lazy-load="true"/>
<mp-html v-if="id==5" :content="html5" :markdown="true" :lazy-load="true"/>
<mp-html v-if="id==9" :content="html9" :markdown="true" :lazy-load="true"/>
</view>
</view>
<!-- service 客服-->
<service ref="serviceId" @goservice="goservice"></service>
<!-- top 返回顶部-->
<top ref="topId"></top>
</view>
</template>
<script>
import top from "../components/top.vue";
import service from "../components/service.vue";
export default {
components: {
top,service
},
data() {
return {
id:1, // 1、用户授权协议 2、用户隐私协议 3、用户注册协议 4、征信授权协议 5、租赁服务协议 6、
title: "用户授权协议",
html1:``,
html2:``,
html3:``,
html4:``,
html5:``,
html9:``,
}
},
onShow(){
},
onLoad(options) {
// 富文本不好二次赋值或者再ready中赋值
if(options.id){
this.id= parseInt(options.id);
}
},
async onReady(){
// 1、用户授权协议 2、用户隐私协议 3、用户注册协议 4、征信授权协议 5、租赁服务协议 6、
if(this.id==1)
{
uni.setNavigationBarTitle({
title: "用户授权协议",
});
this.getxy();
}
else if(this.id==2)
{
uni.setNavigationBarTitle({
title: "用户隐私协议",
});
this.getxy();
}
else if(this.id==3)
{
uni.setNavigationBarTitle({
title: "用户注册协议",
});
this.getxy();
}
else if(this.id==4)
{
uni.setNavigationBarTitle({
title: "征信授权协议",
});
this.getxy();
}
else if(this.id==5)
{
uni.setNavigationBarTitle({
title: "租赁服务协议",
});
this.getxy();
}
else if(this.id==9)
{
uni.setNavigationBarTitle({
title: "招商入驻",
});
this.getInvestmentInfo();
}
else{
uni.setNavigationBarTitle({
title: "租赁服务协议及相关",
});
}
},
onPageScroll(e) {
//调用子组件方法
this.$refs.topId.topData(e.scrollTop);
},
methods:{
async getInvestmentInfo(){
try{
uni.showLoading({
title: '数据加载中...'
});
const {data: res} = await uni.$http.post('/platform/getInvestmentInfo');
if(res){
this.html9=res;
this.$forceUpdate();
}
}
catch(e){
console.log(e)
}
},
async getxy(){
if(this.id){
try{
uni.showLoading({
title: '数据加载中...'
});
const {data: res} = await uni.$http.post('/platform/getProtocol');
// Conten1:用户授权协议
// Conten2:用户隐私协议
// Conten3:用户注册协议
// Conten4:征信授权协议
// Conten5:租赁服务协议
if(res){
// console.log(res.content1)
// console.log(res.content2)
// console.log(res.content3)
// console.log(res.content4)
// console.log(res.content5)
if(this.id==1){
// 1、用户授权协议 2、用户隐私协议 3、用户注册协议 4、征信授权协议 5、租赁服务协议 6、
this.html1=res.content1;
}
else if(this.id==2){
// 1、用户授权协议 2、用户隐私协议 3、用户注册协议 4、征信授权协议 5、租赁服务协议 6、
this.html2=res.content2;
}
else if(this.id==3){
// 1、用户授权协议 2、用户隐私协议 3、用户注册协议 4、征信授权协议 5、租赁服务协议 6、
this.html3=res.content3;
}
else if(this.id==4){
// 1、用户授权协议 2、用户隐私协议 3、用户注册协议 4、征信授权协议 5、租赁服务协议 6、
this.html4=res.content4;
}
else if(this.id==5){
// 1、用户授权协议 2、用户隐私协议 3、用户注册协议 4、征信授权协议 5、租赁服务协议 6、
this.html5=res.content5;
}
this.$forceUpdate();
}
}
catch(e){
console.log(e)
}
}
},
goservice(val){
console.log(val);
},
}
}
</script>
<style lang="scss" scoped>
.user{
background-color: #FFFFFF;
min-height: calc(100vh - var(--window-top)) !important;
}
.info{
position: relative;
display: block;
overflow: hidden;
}
.info-content{
padding: 24rpx 24rpx 40rpx 24rpx;
line-height: 2;
color:#0E1521;
font-size: 28rpx;
letter-spacing: 1rpx;
}
</style>