From 8a5ba4c2f38d7705c72812461893acb22fb34b20 Mon Sep 17 00:00:00 2001 From: yml2213 Date: Sun, 16 Aug 2026 13:36:16 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=8E=A5=E5=8D=95=E5=A4=A7?= =?UTF-8?q?=E5=8E=85=E6=95=B0=E9=87=8F=E5=92=8C=E6=8E=92=E8=A1=8C=E6=A6=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/frontend/src/layouts/WorkerLayout.tsx | 22 +----- .../src/pages/worker/WorkerHallPage.tsx | 74 ++++++++++--------- apps/frontend/src/styles/worker.css | 72 +++++++++++++----- 3 files changed, 96 insertions(+), 72 deletions(-) diff --git a/apps/frontend/src/layouts/WorkerLayout.tsx b/apps/frontend/src/layouts/WorkerLayout.tsx index 78a0d42d..8522b72a 100644 --- a/apps/frontend/src/layouts/WorkerLayout.tsx +++ b/apps/frontend/src/layouts/WorkerLayout.tsx @@ -4,7 +4,7 @@ import { ShoppingOutlined, UserOutlined, } from '@ant-design/icons' -import { App, Button, Layout, Menu, Space, Tag, Typography } from 'antd' +import { App, Button, Layout, Menu, Typography } from 'antd' import type { MenuProps } from 'antd' import { Outlet, useLocation, useNavigate } from 'react-router' @@ -67,12 +67,6 @@ export default function WorkerLayout() {
- - {formatWorkerStatus(status)} - - - {username} - + icon={} + loading={ + ordersQuery.isFetching || + profileQuery.isFetching || + hallSummaryQuery.isFetching + } + onClick={() => refreshAll()} + > + 刷新 + +
+
+ + + +
diff --git a/apps/frontend/src/styles/worker.css b/apps/frontend/src/styles/worker.css index 8d5371ae..e345155f 100644 --- a/apps/frontend/src/styles/worker.css +++ b/apps/frontend/src/styles/worker.css @@ -13,20 +13,27 @@ } .worker-page-head { - display: flex; + display: grid; + grid-template-areas: + 'main' + 'search'; + grid-template-columns: minmax(0, 1fr); align-items: center; - justify-content: space-between; - gap: 16px; + gap: 12px 16px; } .worker-page-head h3 { margin: 0; + flex: 0 0 auto; + white-space: nowrap; } .worker-page-head-title-row { + grid-area: main; display: flex; align-items: center; justify-content: space-between; + min-width: 0; gap: 16px; } @@ -53,9 +60,21 @@ } .worker-hall-search-bar { + grid-area: search; width: 100%; } +.worker-hall-leaderboard-trigger { + flex: 0 0 auto; +} + +.worker-hall-page-actions { + display: flex; + align-items: center; + flex: 0 0 auto; + gap: 12px; +} + /* ===== 我的订单统计与 Tabs (PC端) ===== */ .worker-orders-toolbar { @@ -405,29 +424,46 @@ .worker-hall-card-grid { display: grid; - grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); - gap: 16px; + grid-template-columns: repeat(auto-fill, minmax(225px, 1fr)); + gap: 12px; +} + +/* 1080P 标准桌面屏 (1440px - 1980px) 稳定呈现 6 列 */ +@media (min-width: 1440px) and (max-width: 1980px) { + .worker-hall-card-grid { + grid-template-columns: repeat(6, minmax(0, 1fr)); + gap: 12px; + } +} + +/* 2K 及以上高分宽屏显示器稳定呈现 7 列 */ +@media (min-width: 1981px) { + .worker-hall-card-grid { + grid-template-columns: repeat(7, minmax(0, 1fr)); + gap: 14px; + } } .worker-hall-card { min-width: 0; - padding: 16px; - border-radius: 14px; + padding: 12px 14px; + border-radius: 12px; background: #ffffff; border: 1px solid #e5e7eb; - box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04); + box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04); display: grid; - gap: 12px; + gap: 10px; } .worker-hall-card-title { display: grid; - gap: 4px; + gap: 3px; min-width: 0; } .worker-hall-card-title .ant-typography { margin: 0; + font-size: 12px; } .worker-hall-card-link, @@ -436,7 +472,7 @@ max-width: 100%; font-weight: 600; color: #0f172a; - font-size: 15px; + font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; @@ -444,12 +480,12 @@ .worker-hall-card-amount-row { display: grid; - gap: 6px; + gap: 4px; } .worker-hall-card-amount { color: #f97316; - font-size: 32px; + font-size: 28px; line-height: 1; font-weight: 700; } @@ -458,12 +494,12 @@ .worker-hall-card-hint { margin: 0; font-size: 12px; - line-height: 1.5; + line-height: 1.4; } .worker-hall-card-actions { display: grid; - gap: 8px; + gap: 6px; margin-top: auto; } @@ -471,7 +507,7 @@ display: flex; align-items: center; justify-content: space-between; - gap: 8px; + gap: 6px; } .worker-hall-card-actions-row .ant-btn { @@ -480,12 +516,14 @@ .worker-hall-card-grab-row { display: flex; - gap: 8px; + gap: 6px; } .worker-hall-card-grab-row .ant-btn { flex: 1; min-width: 0; + padding-inline: 6px; + font-size: 14px; } .worker-hall-sharing-button:not(:disabled) {