49 lines
826 B
Vue
49 lines
826 B
Vue
<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> |