补充数据库数据,修改分类栏内容

This commit is contained in:
2026-05-21 11:50:32 +08:00
parent b8b0b453e0
commit 7ba3d313be
32 changed files with 6657 additions and 1684 deletions

View File

@@ -8,20 +8,22 @@
<text v-if="deliveryInfo != null" class="info-text">资质状态:{{ deliveryInfo.certificateStatus }}</text>
</ServicePanel>
<ServicePanel title="提醒与权限" subtitle="预留定位权限、语音播报和消息提醒控制。">
<ServicePanel title="提醒与权限" subtitle="保留消息提醒和定位权限提示占位。">
<view class="setting-row">
<text class="setting-text">消息提醒</text>
<switch :checked="messageEnabled" color="#0f766e" @change="toggleMessage" />
</view>
<view class="setting-row">
<text class="setting-text">语音播报</text>
<switch :checked="voiceEnabled" color="#0f766e" @change="toggleVoice" />
<switch :checked="messageEnabled" color="#1f7db4" @change="toggleMessage" />
</view>
<view class="setting-row">
<text class="setting-text">定位权限提示</text>
<text class="setting-hint">请确保 Android 和小程序侧授权开启</text>
<text class="setting-hint">定位轨迹仅做字段预留,当前为 mock</text>
</view>
<view class="setting-row setting-row-last">
<text class="setting-text">图片上传</text>
<text class="setting-hint">当前仅占位,不做真实上传</text>
</view>
</ServicePanel>
<view class="logout-btn" @click="confirmLogout"><text class="logout-text">退出登录</text></view>
</ServicePageScaffold>
</template>
@@ -32,10 +34,9 @@ import ServicePageScaffold from '@/components/homeService/ServicePageScaffold.uv
import ServicePanel from '@/components/homeService/ServicePanel.uvue'
import type { DeliveryInfoType } from '@/types/delivery.uts'
import { getDeliveryProfile } from '@/services/deliveryService.uts'
import { requireDeliveryAuth } from '@/utils/deliveryAuth.uts'
import { logoutDelivery, requireDeliveryAuth } from '@/utils/deliveryAuth.uts'
const messageEnabled = ref(true)
const voiceEnabled = ref(false)
const deliveryInfo = ref<DeliveryInfoType | null>(null)
function displayOrganizationName(): string {
@@ -62,9 +63,7 @@ function displayStaffNo(): string {
function restoreSettings() {
const msg = uni.getStorageSync('delivery_setting_message') as boolean | null
const voice = uni.getStorageSync('delivery_setting_voice') as boolean | null
messageEnabled.value = msg == null ? true : msg
voiceEnabled.value = voice == null ? false : voice
}
function toggleMessage(event: any) {
@@ -72,9 +71,17 @@ function toggleMessage(event: any) {
uni.setStorageSync('delivery_setting_message', messageEnabled.value)
}
function toggleVoice(event: any) {
voiceEnabled.value = event.detail.value === true
uni.setStorageSync('delivery_setting_voice', voiceEnabled.value)
function confirmLogout() {
uni.showModal({
title: '退出登录',
content: '退出后将清除服务人员信息并返回登录页。',
success: async (result) => {
if (result.confirm) {
await logoutDelivery()
uni.reLaunch({ url: '/pages/user/login?mode=delivery' })
}
}
})
}
async function loadData() {
@@ -100,6 +107,10 @@ onShow(() => {
align-items: center;
}
.setting-row-last {
border-bottom-width: 0;
}
.info-text {
display: block;
margin-top: 12rpx;
@@ -120,4 +131,19 @@ onShow(() => {
text-align: right;
width: 60%;
}
.logout-btn {
margin-top: 24rpx;
padding: 20rpx 0;
border-radius: 18rpx;
background-color: #fff1f2;
align-items: center;
justify-content: center;
}
.logout-text {
font-size: 28rpx;
font-weight: 700;
color: #dc2626;
}
</style>