From 9d738becd31ba1108eb90335a6cdb652c11b4c34 Mon Sep 17 00:00:00 2001 From: yml Date: Sat, 14 Nov 2026 01:23:15 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=8D=8A=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E5=B1=A5=E7=BA=A6=E5=AE=A2=E6=88=B7=E9=A1=B5=E4=B8=8E=E5=90=8E?= =?UTF-8?q?=E5=8F=B0=E6=93=8D=E4=BD=9C=E5=B8=83=E5=B1=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 用户侧统一显示等待客服处理并精简平台标题;移除 Cookie 等专业表述;后台操作改为两行行内按钮,取消操作下拉。 --- .../src/services/dev-mock/dev-mock-service.ts | 2 +- .../semi-auto/semi-auto-task-service.ts | 2 +- .../semi-auto-task.integration.test.ts | 2 +- .../pages/admin/AdminSemiAutoTasksPage.tsx | 195 ++++++++---------- .../CustomerFulfillmentPage.tsx | 23 +-- apps/frontend/src/styles/client.css | 21 +- 6 files changed, 100 insertions(+), 145 deletions(-) diff --git a/apps/backend/src/services/dev-mock/dev-mock-service.ts b/apps/backend/src/services/dev-mock/dev-mock-service.ts index 5136090e..cf70d8ca 100644 --- a/apps/backend/src/services/dev-mock/dev-mock-service.ts +++ b/apps/backend/src/services/dev-mock/dev-mock-service.ts @@ -366,7 +366,7 @@ export async function createSemiAutoMock( pageDescription, loginInstructions: platform === 'weibo' - ? '真实登录:使用微博绑定手机号接收验证码登录,或使用微博 App 扫码登录。登录仅用于本次订单履约,不会在页面展示账号 Cookie。' + ? '真实登录:使用微博绑定手机号接收验证码登录,或使用微博 App 扫码登录。登录信息仅用于本次订单履约。' : connectorMode === 'mock' ? 'Mock 登录:点击获取二维码后,页面轮询两次会自动模拟登录成功。' : '真实登录:点击获取二维码后,请使用虎牙 App 扫码并在手机上确认登录。', diff --git a/apps/backend/src/services/semi-auto/semi-auto-task-service.ts b/apps/backend/src/services/semi-auto/semi-auto-task-service.ts index 5c481619..712256de 100644 --- a/apps/backend/src/services/semi-auto/semi-auto-task-service.ts +++ b/apps/backend/src/services/semi-auto/semi-auto-task-service.ts @@ -172,7 +172,7 @@ function displayStatus(task: TaskRow) { return { key: 'failed', label: '需客服处理' } } if (task.login_status === 'authenticated') { - return { key: 'waiting_operator', label: 'CK 已获取,等待客服处理' } + return { key: 'waiting_operator', label: '等待客服处理' } } if (task.login_status === 'scanned') return { key: 'login_scanned', label: '已扫码,确认中' } if (task.login_status === 'qr_pending') return { key: 'waiting_login', label: '等待客户登录' } diff --git a/apps/backend/src/services/semi-auto/semi-auto-task.integration.test.ts b/apps/backend/src/services/semi-auto/semi-auto-task.integration.test.ts index 0e8aac7e..fe929e8c 100644 --- a/apps/backend/src/services/semi-auto/semi-auto-task.integration.test.ts +++ b/apps/backend/src/services/semi-auto/semi-auto-task.integration.test.ts @@ -141,7 +141,7 @@ test( ) const authenticatedList = await listAdminSemiAutoTasks({ keyword: orderNo }) assert.equal(authenticatedList.items[0]?.loginStatus, 'authenticated') - assert.equal(authenticatedList.items[0]?.displayStatus.label, 'CK 已获取,等待客服处理') + assert.equal(authenticatedList.items[0]?.displayStatus.label, '等待客服处理') const exported = await exportAdminSemiAutoCredential(taskId) assert.equal(exported.credentialId, credentialId) assert.equal(exported.platform, 'huya') diff --git a/apps/frontend/src/pages/admin/AdminSemiAutoTasksPage.tsx b/apps/frontend/src/pages/admin/AdminSemiAutoTasksPage.tsx index ef564db2..e367e2af 100644 --- a/apps/frontend/src/pages/admin/AdminSemiAutoTasksPage.tsx +++ b/apps/frontend/src/pages/admin/AdminSemiAutoTasksPage.tsx @@ -2,10 +2,7 @@ import { CheckCircleOutlined, ChromeOutlined, CopyOutlined, - DownOutlined, KeyOutlined, - LinkOutlined, - MoreOutlined, ReloadOutlined, SendOutlined, UserSwitchOutlined, @@ -17,7 +14,6 @@ import { Card, Descriptions, Drawer, - Dropdown, Form, Input, InputNumber, @@ -288,76 +284,6 @@ export default function AdminSemiAutoTasksPage() { }) } - function credentialMenu(task: SemiAutoTask) { - return { - items: [ - { - key: 'copy', - icon: , - label: '复制最终 CK', - disabled: !task.credentialReady || credentialExportMutation.isPending, - }, - { - key: 'inject', - icon: , - label: '注入浏览器', - disabled: !taskCanUseCredential(task) || injectionMutation.isPending, - }, - ], - onClick: ({ key }: { key: string }) => { - if (key === 'copy') { - confirmCopyCredential(task) - return - } - if (key === 'inject') injectionMutation.mutate(task) - }, - } - } - - function taskMenu(task: SemiAutoTask) { - const active = task.executionStatus !== 'completed' && task.executionStatus !== 'cancelled' - return { - items: [ - { - key: 'copy', - icon: , - label: '复制客户链接', - }, - { - key: 'sync', - icon: , - label: '刷新客户状态', - disabled: syncMutation.isPending, - }, - ...(!task.assignedAdminUserId - ? [ - { - key: 'claim', - icon: , - label: '领取任务', - disabled: claimMutation.isPending, - }, - ] - : []), - ...(active - ? [ - { - key: 'cancel', - danger: true, - label: '取消任务', - }, - ] - : []), - ], - onClick: ({ key }: { key: string }) => { - if (key === 'copy') void copyCustomerLink(task) - if (key === 'sync') syncMutation.mutate(task.id) - if (key === 'claim') claimMutation.mutate(task.id) - if (key === 'cancel') confirmCancel(task) - }, - } - } - function openComplete(task: SemiAutoTask) { setCompleteTask(task) setCompleteFiles([]) @@ -461,46 +387,88 @@ export default function AdminSemiAutoTasksPage() { { title: '操作', key: 'actions', - width: 340, + width: 520, render: (_, task) => ( - - - {taskNeedsCustomerReauth(task) ? ( + + + + {taskNeedsCustomerReauth(task) ? ( + + ) : null} - ) : null} - - - - {task.executionStatus !== 'completed' && - task.executionStatus !== 'cancelled' && - !taskNeedsCustomerReauth(task) ? ( - ) : null} - - - + + {!task.assignedAdminUserId ? ( + + ) : null} + {task.executionStatus !== 'completed' && + task.executionStatus !== 'cancelled' && + !taskNeedsCustomerReauth(task) ? ( + + ) : null} + {task.executionStatus !== 'completed' && task.executionStatus !== 'cancelled' ? ( + + ) : null} + ), }, @@ -690,11 +658,22 @@ export default function AdminSemiAutoTasksPage() { > 刷新客户状态 - - - + + diff --git a/apps/frontend/src/pages/customer-fulfillment/CustomerFulfillmentPage.tsx b/apps/frontend/src/pages/customer-fulfillment/CustomerFulfillmentPage.tsx index d25beed8..15db20fd 100644 --- a/apps/frontend/src/pages/customer-fulfillment/CustomerFulfillmentPage.tsx +++ b/apps/frontend/src/pages/customer-fulfillment/CustomerFulfillmentPage.tsx @@ -251,14 +251,13 @@ export default function CustomerFulfillmentPage() { } const config = selectedTask?.semiAutoConfig || {} - const title = config.pageTitle || (isWeibo ? '微博账号授权' : '账号授权与角色绑定') - const displayTitle = isWeibo ? '微博账号登录授权' : title + const displayTitle = isWeibo ? '微博账号登录授权' : '虎牙账号登录授权' const loginQrVisible = selectedTask && ['qr_pending', 'scanned'].includes(selectedTask.loginStatus) if (loading) { return ( - +
} /> 正在读取订单履约信息... @@ -269,7 +268,7 @@ export default function CustomerFulfillmentPage() { if (loadError || tasks.length === 0) { return ( - +

订单信息读取失败

{loadError || '该订单没有需要客户授权或绑定的任务。'}

@@ -280,11 +279,7 @@ export default function CustomerFulfillmentPage() { if (selectedTask?.executionStatus === 'completed') { return ( - +
@@ -309,11 +304,7 @@ export default function CustomerFulfillmentPage() { } return ( - +
{tasks.length > 1 ? (
@@ -503,7 +494,6 @@ export default function CustomerFulfillmentPage() { function CustomerAuthFrame(input: { platform?: CustomerSemiAutoTask['platform'] - eyebrow: string title: string children: ReactNode }) { @@ -515,9 +505,6 @@ function CustomerAuthFrame(input: {
- {input.platform !== 'weibo' ? ( - {input.eyebrow} - ) : null}

{input.title}

diff --git a/apps/frontend/src/styles/client.css b/apps/frontend/src/styles/client.css index 08d03a56..d1292bee 100644 --- a/apps/frontend/src/styles/client.css +++ b/apps/frontend/src/styles/client.css @@ -1502,21 +1502,14 @@ box-shadow: inset 0 0 24px rgba(255, 138, 0, 0.06); } -.customer-auth-eyebrow { - display: block; - margin-bottom: 4px; - color: rgba(255, 255, 255, 0.78); - font-size: 15px; - font-weight: 500; -} - .customer-auth-brand h1 { margin: 0; color: #fff; - font-size: clamp(26px, 4.2vw, 38px); - line-height: 1.25; - font-weight: 700; + font-size: clamp(18px, 2.3vw, 22px); + line-height: 1.3; + font-weight: 600; letter-spacing: 0; + white-space: nowrap; overflow-wrap: anywhere; } @@ -2087,12 +2080,8 @@ background-position: 58% center; } - .customer-auth-eyebrow { - font-size: 13px; - } - .customer-auth-brand h1 { - font-size: 26px; + font-size: 18px; } .customer-auth-warning {