feat: 用户协议、隐私政策
This commit is contained in:
parent
4250d7c8f6
commit
1e96041d1c
|
|
@ -115,6 +115,12 @@ class Api {
|
|||
let url = `${config.host}/worker/worker/updateWorkerLocation`;
|
||||
return fetch.request('postFrom', url, data, true)
|
||||
}
|
||||
|
||||
// 获取配置
|
||||
static getConfig(data) {
|
||||
let url = `${config.host}/worker/common/config`;
|
||||
return fetch.request('GET', url, {}, false)
|
||||
}
|
||||
}
|
||||
|
||||
export default Api
|
||||
|
|
|
|||
42
pages.json
42
pages.json
|
|
@ -59,20 +59,34 @@
|
|||
{
|
||||
"navigationBarTitleText" : "完成服务"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "pages/order/report-order-exception",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText" : "上报异常"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "pages/order/worker-remark",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText" : "工单备注"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "pages/order/report-order-exception",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText" : "上报异常"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "pages/order/worker-remark",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText" : "工单备注"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "pages/user/user-agreement",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText" : "用户协议"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "pages/user/privacy-policy",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText" : "隐私协议"
|
||||
}
|
||||
}
|
||||
],
|
||||
"globalStyle": {
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
<me-icon v-else class="icon" type="icon-checkbox-blank-circle" size="40rpx" color="var(--summaryColor)"></me-icon>
|
||||
阅读并同意
|
||||
</view>
|
||||
<view class="text"> <text>用户协议</text>、<text>隐私协议</text></view>
|
||||
<view class="text"> <text @click="userAgreement()">用户协议</text>、<text @click="privacyPolicy()">隐私协议</text></view>
|
||||
</view>
|
||||
<view class="btn-area flex-c">
|
||||
<view hover-class="auto-mask-layer-radius8" hover-start-time="0" hover-stay-time="50">
|
||||
|
|
@ -41,6 +41,14 @@ import helpers from "../../utils/helpers";
|
|||
import api from "../../api/api";
|
||||
import {throttle} from "../../utils/throttle";
|
||||
|
||||
const userAgreement = () => {
|
||||
helpers.jumpToPage('user-agreement')
|
||||
}
|
||||
|
||||
const privacyPolicy = () => {
|
||||
helpers.jumpToPage('privacy-policy')
|
||||
}
|
||||
|
||||
const visitor = () => {
|
||||
api.guestLogin().then(res => {
|
||||
storageUserInfo(res)
|
||||
|
|
|
|||
26
pages/user/privacy-policy.vue
Normal file
26
pages/user/privacy-policy.vue
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
<template>
|
||||
<view class="ctr">
|
||||
<rich-text :nodes="data"></rich-text>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref } from 'vue'
|
||||
import {onShow} from '@dcloudio/uni-app'
|
||||
import api from "../../api/api";
|
||||
|
||||
const data = ref('')
|
||||
onShow(() => {
|
||||
api.getConfig().then(res => {
|
||||
data.value = res.privacy_policy
|
||||
}).catch(() => {})
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.ctr {
|
||||
background-color: var(--containerBgColor);
|
||||
padding: 32rpx 32rpx 100rpx 32rpx;
|
||||
color: var(--titleColor);
|
||||
}
|
||||
</style>
|
||||
26
pages/user/user-agreement.vue
Normal file
26
pages/user/user-agreement.vue
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
<template>
|
||||
<view class="ctr">
|
||||
<rich-text :nodes="data"></rich-text>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref } from 'vue'
|
||||
import {onShow} from '@dcloudio/uni-app'
|
||||
import api from "../../api/api";
|
||||
|
||||
const data = ref('')
|
||||
onShow(() => {
|
||||
api.getConfig().then(res => {
|
||||
data.value = res.user_agreement
|
||||
}).catch(() => {})
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.ctr {
|
||||
background-color: var(--containerBgColor);
|
||||
padding: 32rpx 32rpx 100rpx 32rpx;
|
||||
color: var(--titleColor);
|
||||
}
|
||||
</style>
|
||||
|
|
@ -29,6 +29,10 @@ class helpers {
|
|||
'report-order-exception': '/pages/order/report-order-exception',
|
||||
//更新师傅备注
|
||||
'worker-remark': '/pages/order/worker-remark',
|
||||
//用户协议
|
||||
'user-agreement': '/pages/user/user-agreement',
|
||||
//隐私政策
|
||||
'privacy-policy': '/pages/user/privacy-policy',
|
||||
}
|
||||
|
||||
url = paths[pathName]
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user