feat: 用户协议、隐私政策

This commit is contained in:
苟川东 2025-04-24 16:20:43 +08:00
parent 4250d7c8f6
commit 1e96041d1c
6 changed files with 99 additions and 15 deletions

View File

@ -115,6 +115,12 @@ class Api {
let url = `${config.host}/worker/worker/updateWorkerLocation`; let url = `${config.host}/worker/worker/updateWorkerLocation`;
return fetch.request('postFrom', url, data, true) 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 export default Api

View File

@ -59,20 +59,34 @@
{ {
"navigationBarTitleText" : "完成服务" "navigationBarTitleText" : "完成服务"
} }
}, },
{ {
"path" : "pages/order/report-order-exception", "path" : "pages/order/report-order-exception",
"style" : "style" :
{ {
"navigationBarTitleText" : "上报异常" "navigationBarTitleText" : "上报异常"
} }
}, },
{ {
"path" : "pages/order/worker-remark", "path" : "pages/order/worker-remark",
"style" : "style" :
{ {
"navigationBarTitleText" : "工单备注" "navigationBarTitleText" : "工单备注"
} }
},
{
"path" : "pages/user/user-agreement",
"style" :
{
"navigationBarTitleText" : "用户协议"
}
},
{
"path" : "pages/user/privacy-policy",
"style" :
{
"navigationBarTitleText" : "隐私协议"
}
} }
], ],
"globalStyle": { "globalStyle": {

View File

@ -16,7 +16,7 @@
<me-icon v-else class="icon" type="icon-checkbox-blank-circle" size="40rpx" color="var(--summaryColor)"></me-icon> <me-icon v-else class="icon" type="icon-checkbox-blank-circle" size="40rpx" color="var(--summaryColor)"></me-icon>
阅读并同意 阅读并同意
</view> </view>
<view class="text">&nbsp<text>用户协议</text><text>隐私协议</text></view> <view class="text">&nbsp<text @click="userAgreement()">用户协议</text><text @click="privacyPolicy()">隐私协议</text></view>
</view> </view>
<view class="btn-area flex-c"> <view class="btn-area flex-c">
<view hover-class="auto-mask-layer-radius8" hover-start-time="0" hover-stay-time="50"> <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 api from "../../api/api";
import {throttle} from "../../utils/throttle"; import {throttle} from "../../utils/throttle";
const userAgreement = () => {
helpers.jumpToPage('user-agreement')
}
const privacyPolicy = () => {
helpers.jumpToPage('privacy-policy')
}
const visitor = () => { const visitor = () => {
api.guestLogin().then(res => { api.guestLogin().then(res => {
storageUserInfo(res) storageUserInfo(res)

View 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>

View 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>

View File

@ -29,6 +29,10 @@ class helpers {
'report-order-exception': '/pages/order/report-order-exception', 'report-order-exception': '/pages/order/report-order-exception',
//更新师傅备注 //更新师傅备注
'worker-remark': '/pages/order/worker-remark', 'worker-remark': '/pages/order/worker-remark',
//用户协议
'user-agreement': '/pages/user/user-agreement',
//隐私政策
'privacy-policy': '/pages/user/privacy-policy',
} }
url = paths[pathName] url = paths[pathName]