[用户隐私协议和服务协议新增及接口]
This commit is contained in:
59
pages/login/agreement.vue
Normal file
59
pages/login/agreement.vue
Normal file
@@ -0,0 +1,59 @@
|
||||
<template>
|
||||
<view>
|
||||
<view class="clauseCont">
|
||||
<rich-text :nodes="clauseData"></rich-text>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
secretService
|
||||
} from '@/apis/interfaces/auth'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
clauseData: [] //服务条款
|
||||
};
|
||||
},
|
||||
onLoad(e) {
|
||||
if(e.name === 'service'){
|
||||
uni.setNavigationBarTitle({
|
||||
title:'用户服务协议'
|
||||
})
|
||||
}else{
|
||||
uni.setNavigationBarTitle({
|
||||
title:'用户隐私协议'
|
||||
})
|
||||
}
|
||||
// 获取服务条款
|
||||
this.clauseInfo(e.name)
|
||||
},
|
||||
methods: {
|
||||
// 服务条款
|
||||
clauseInfo(name) {
|
||||
secretService(name).then(res => {
|
||||
this.clauseData = res.content.replace(/\<img/gi,
|
||||
'<img style="max-width:100%; height:auto; vertical-align: top;"')
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: err.message
|
||||
})
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
page {
|
||||
background-color: $uni-bg-color;
|
||||
}
|
||||
|
||||
.clauseCont {
|
||||
padding: $padding + 10 $padding * 2;
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
</style>
|
||||
@@ -26,7 +26,7 @@
|
||||
</view>
|
||||
</view>
|
||||
<!-- 用户登录注册协议 -->
|
||||
<view class="agreement">未注册的手机号验证后将自动创建账号,登录即表示同意接收<navigator url="">用户隐私规格</navigator>和<navigator url="">用户服务协议
|
||||
<view class="agreement">未注册的手机号验证后将自动创建账号,登录即表示同意接收<navigator url="/pages/login/agreement?name=secret">用户隐私协议</navigator>和<navigator url="/pages/login/agreement?name=service">用户服务协议
|
||||
</navigator>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
Reference in New Issue
Block a user