隐私政策 用户协议

This commit is contained in:
zhangwentao 2024-11-04 17:51:44 +08:00
parent 8dc8dc981f
commit 2ec742414e
4 changed files with 92 additions and 4 deletions

View File

@ -66,5 +66,25 @@ export const regionList = (query) => {
}) })
} }
// 用户协议
export const protocolUser = (query) => {
return apiResquest({
url: 'v1/protocol.user',
method: 'get',
query: query
})
}
// 隐私政策
export const protocolPrivacy = (query) => {
return apiResquest({
url: 'v1/protocol.privacy',
method: 'get',
query: query
})
}

View File

@ -186,6 +186,15 @@
} }
} }
}, },
{ // //
"path": "pages/mine/protocol",
"style": {
"navigationBarTitleText": "",
"app-plus": {
"bounce": "none"
}
}
},
{ // // { // //
"path": "pages/news/news-topic-detail", "path": "pages/news/news-topic-detail",
"style": { "style": {

View File

@ -87,6 +87,16 @@
icon: 'iconshezhi1', icon: 'iconshezhi1',
name: '修改资料', name: '修改资料',
url: 'set' url: 'set'
},
{
icon: 'iconrenzheng',
name: '用户协议',
url: 'user'
},
{
icon: 'iconrenzheng',
name: '隐私政策',
url: 'privacy'
} }
], ],
userInfo: {}, userInfo: {},
@ -132,11 +142,11 @@
case 'set': case 'set':
this.$u.route('/pages/mine/edit-info') this.$u.route('/pages/mine/edit-info')
break; break;
case 'file2': case 'user':
this.downloadFile(this.flieList.file2) this.$u.route('/pages/mine/protocol?type=user')
break; break;
case 'file1': case 'privacy':
this.downloadFile(this.flieList.file1) this.$u.route('pages/mine/protocol?type=privacy')
break; break;
default: default:
break; break;

49
pages/mine/protocol.vue Normal file
View File

@ -0,0 +1,49 @@
<template>
<view style="width: 90%; margin: 0 auto;">
<u-parse :content="detail"></u-parse>
</view>
</template>
<script>
import {
protocolUser,
protocolPrivacy
} from '@/api/login.js'
export default {
data() {
return {
type: '',
detail: ''
}
},
onLoad(options) {
this.type = options.type
if (this.type == 'user') {
this.getProtocolUser()
uni.setNavigationBarTitle({
title: '用户协议'
})
} else {
this.getProtocolPrivacy()
uni.setNavigationBarTitle({
title: '隐私政策'
})
}
},
methods: {
getProtocolUser() {
protocolUser().then(res => {
this.detail = res.data.content
})
},
getProtocolPrivacy() {
protocolPrivacy().then(res => {
this.detail = res.data.content
})
}
}
}
</script>
<style>
</style>