完善接单平台通知配置

This commit is contained in:
yml2213
2026-08-17 13:54:01 +08:00
parent bca2e4a801
commit 5330b55b75
27 changed files with 1390 additions and 10 deletions
@@ -7,4 +7,5 @@ export * from './kuaishou-industry'
export * from './orders'
export * from './tasks'
export * from './dev-mock'
export * from './notifications'
export * from './worker-platform'
@@ -0,0 +1,21 @@
import { apiGet } from '@/lib/http'
export type AdminNotification = {
notificationId: number
notificationType: string
priority: 'normal' | 'high' | 'urgent' | string
entityType: string
entityId: number
title: string
body: string
actionPath: string
reminderCount: number
soundEnabled: boolean
lastRemindedAt: string | null
createdAt: string
updatedAt: string
}
export function fetchAdminNotifications() {
return apiGet<{ pendingCount: number; items: AdminNotification[] }>('/api/v1/admin/notifications')
}
@@ -9,6 +9,7 @@ import type {
WorkProductRule,
WorkerFinanceConfig,
WorkerFinanceRequest,
WorkerPlatformNotificationConfig,
WorkerLevel,
WorkerListResponse,
WorkerUser,
@@ -203,6 +204,21 @@ export function saveAdminWorkerFinanceConfig(payload: {
return apiPost<WorkerFinanceConfig>('/api/v1/admin/worker-platform/finance-config', payload)
}
export function fetchAdminWorkerPlatformNotificationConfig() {
return apiGet<WorkerPlatformNotificationConfig>(
'/api/v1/admin/worker-platform/notification-config',
)
}
export function saveAdminWorkerPlatformNotificationConfig(
payload: WorkerPlatformNotificationConfig,
) {
return apiPost<WorkerPlatformNotificationConfig>(
'/api/v1/admin/worker-platform/notification-config',
payload,
)
}
export function fetchAdminWorkerFinanceRequests(params?: Record<string, unknown>) {
return apiGet<WorkerListResponse<WorkerFinanceRequest>>(
'/api/v1/admin/worker-platform/finance-requests',
+6
View File
@@ -154,6 +154,12 @@ export function submitWorkerAcceptance(
)
}
export function remindWorkerAcceptance(workOrderId: number) {
return apiPost<{ reminderCount: number; nextRemindAt: string }>(
`/api/v1/worker/orders/${workOrderId}/remind-acceptance`,
)
}
export function saveWorkerAcceptanceDraft(
workOrderId: number,
payload: { note?: string; imageUrls?: string[]; files?: UploadedFile[] },