From 0df5c9f34e26afe0f5ab88c1868c35c0f575aa36 Mon Sep 17 00:00:00 2001 From: yml2213 Date: Mon, 21 Sep 2026 12:37:38 +0800 Subject: [PATCH] =?UTF-8?q?feat(worker-platform):=20=E6=8A=A2=E5=8D=95?= =?UTF-8?q?=E5=A4=A7=E5=8E=85=E9=A6=96=E9=A1=B5=E6=96=B0=E5=A2=9E=E8=81=94?= =?UTF-8?q?=E7=B3=BB=E5=AE=A2=E6=9C=8D=E8=83=B6=E5=9B=8A=E5=85=A5=E5=8F=A3?= =?UTF-8?q?=E5=B9=B6=E6=8A=BD=E8=B1=A1=E9=80=9A=E7=94=A8=E5=AE=A2=E6=9C=8D?= =?UTF-8?q?=E5=BC=B9=E7=AA=97=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. 抽离打手端通用联系客服弹窗组件 WorkerContactModal,统一维护微信二维码、打手账号/状态/余额回显、一键复制及沟通提示; 2. 抢单大厅移动端顶部状态栏(余额上限右侧首屏黄金位)新增精致微动效【联系客服】胶囊按钮,大幅缩短找客服沟通链路; 3. 抢单大厅桌面端头部操作栏同步补齐【联系客服】按钮,并在个人中心账号弹窗中统一复用 WorkerContactModal; 4. 适配移动端与超窄屏自适应响应式样式,完成前端59项测试与全量打包构建验证。 --- .../components/worker/WorkerContactModal.tsx | 79 +++++++++++++++++++ .../src/pages/worker/WorkerHallPage.tsx | 26 ++++++ .../worker/WorkerProfileAccountModals.tsx | 62 ++------------- apps/frontend/src/styles/worker.css | 56 +++++++++++++ docs/寄卖库存优化现状与进度追踪.md | 41 ++++++++++ 5 files changed, 210 insertions(+), 54 deletions(-) create mode 100644 apps/frontend/src/components/worker/WorkerContactModal.tsx diff --git a/apps/frontend/src/components/worker/WorkerContactModal.tsx b/apps/frontend/src/components/worker/WorkerContactModal.tsx new file mode 100644 index 00000000..c6172f75 --- /dev/null +++ b/apps/frontend/src/components/worker/WorkerContactModal.tsx @@ -0,0 +1,79 @@ +import { Alert, Button, Descriptions, Image, Modal, Space, Typography } from 'antd' + +import { formatMoney, formatWorkerStatus } from '@/pages/worker/worker-profile-view-utils' +import type { WorkerFinanceConfig, WorkerUser } from '@/types/worker-platform' + +export type WorkerContactModalProps = { + open: boolean + onClose: () => void + isMobile?: boolean + worker?: WorkerUser | null + financeConfig?: WorkerFinanceConfig | null + title?: string +} + +export function WorkerContactModal({ + open, + onClose, + isMobile = false, + worker, + financeConfig, + title = '联系客服', +}: WorkerContactModalProps) { + return ( + + 我知道了 + + } + onCancel={onClose} + > + + + {financeConfig?.adminContact?.wechatQrCodeImage ? ( +
+ 客服微信二维码 +
+ ) : ( + + 客服暂未配置微信二维码,请按下方账号信息联系。 + + )} + + + {worker?.username || '-'} + + {worker?.displayName || '-'} + + {worker?.phone || '-'} + + + {formatWorkerStatus(worker?.status || '')} + + + {formatMoney(worker?.wallet?.availableAmount)} + + + + 建议沟通时一起提供:申请类型、金额、订单号或转账备注、收款方式,以及当前账号信息。 + +
+
+ ) +} diff --git a/apps/frontend/src/pages/worker/WorkerHallPage.tsx b/apps/frontend/src/pages/worker/WorkerHallPage.tsx index a7f62b01..83e28528 100644 --- a/apps/frontend/src/pages/worker/WorkerHallPage.tsx +++ b/apps/frontend/src/pages/worker/WorkerHallPage.tsx @@ -3,6 +3,7 @@ import { ArrowRightOutlined, CheckCircleOutlined, ClockCircleOutlined, + CustomerServiceOutlined, FireOutlined, PushpinOutlined, QuestionCircleOutlined, @@ -35,6 +36,8 @@ import { import { useEffect, useRef, useState } from 'react' import { Link } from 'react-router' +import { WorkerContactModal } from '@/components/worker/WorkerContactModal' + import { fetchWorkerHallCategories, fetchWorkerHallOrders, @@ -83,6 +86,7 @@ export default function WorkerHallPage() { const [grabbingId, setGrabbingId] = useState(0) const [sharingOrder, setSharingOrder] = useState(null) const [leaderboardOpen, setLeaderboardOpen] = useState(false) + const [contactOpen, setContactOpen] = useState(false) const [leaderboardPeriod, setLeaderboardPeriod] = useState('all') const [sharingQuantity, setSharingQuantity] = useState(1) const [submittingSharing, setSubmittingSharing] = useState(false) @@ -236,6 +240,7 @@ export default function WorkerHallPage() { setFailedImageKeys({}) }, [allCategories.length, allIconUrl]) const worker = profileQuery.data?.data.worker + const financeConfig = profileQuery.data?.data.financeConfig const isInternalWorker = worker?.workerType === 'internal' const activeCount = Number(profileQuery.data?.data.summary.activeOrderCount || 0) const pendingAcceptanceCount = hallSummaryQuery.data?.pendingAcceptanceCount || 0 @@ -411,6 +416,16 @@ export default function WorkerHallPage() { + +
+
@@ -1298,6 +1316,14 @@ export default function WorkerHallPage() { ) : null} + + setContactOpen(false)} + isMobile={isMobile} + worker={worker} + financeConfig={financeConfig} + /> ) } diff --git a/apps/frontend/src/pages/worker/WorkerProfileAccountModals.tsx b/apps/frontend/src/pages/worker/WorkerProfileAccountModals.tsx index af9492ab..1b873095 100644 --- a/apps/frontend/src/pages/worker/WorkerProfileAccountModals.tsx +++ b/apps/frontend/src/pages/worker/WorkerProfileAccountModals.tsx @@ -17,7 +17,8 @@ import type { WorkerFinanceConfig, WorkerSessionDevice, WorkerUser } from '@/typ import { formatDateTime } from '@/utils/date-time' import { isWorkerPasswordStrong, WORKER_PASSWORD_RULE_MESSAGE } from '@/utils/worker-password' -import { formatMoney, formatWorkerStatus } from './worker-profile-view-utils' +import { WorkerContactModal } from '@/components/worker/WorkerContactModal' +import { formatWorkerStatus } from './worker-profile-view-utils' export type PasswordFormValues = { currentPassword?: string @@ -184,60 +185,13 @@ export function WorkerProfileAccountModals({ - setContactOpen(false)}> - 我知道了 - - } - onCancel={() => setContactOpen(false)} - > - - - {financeConfig?.adminContact?.wechatQrCodeImage ? ( -
- 管理员微信二维码 -
- ) : ( - - 管理员暂未配置微信二维码,请按下方账号信息联系。 - - )} - - - {worker?.username || '-'} - - {worker?.displayName || '-'} - - {worker?.phone || '-'} - - - {formatWorkerStatus(worker?.status || '')} - - - {formatMoney(worker?.wallet.availableAmount)} - - - - 建议沟通时一起提供:申请类型、金额、订单号或转账备注、收款方式,以及当前账号信息。 - -
-
+ onClose={() => setContactOpen(false)} + isMobile={isMobile} + worker={worker} + financeConfig={financeConfig} + /> setContactOpen(true)}> + + 联系客服 + + ``` + - 采用浅暖橙背景(`#fff7ed`)+ 优雅橙边框(`#fed7aa`)+ 微动效,与打手端整体暖橙调性浑然一体,点击即弹出客服微信与账号卡片。 +3. **桌面端同步补齐入口**: + - 在桌面端头部操作按钮栏(刷新与排行榜旁)新增 ``。 +4. **验证门禁全绿通过 [确信度: 100%]**: + - 前端 59 个自动化测试全绿(**59 pass / 0 fail**); + - 前端 `format:check`、`lint:check`、`typecheck`、`build` 均零错误零警告通过; + - 后端 504 个自动化测试全绿(**501 pass / 3 skipped / 0 fail**)。 +