From aed11961edadfdfb9fc541f61bc0ac8e0f84db17 Mon Sep 17 00:00:00 2001 From: yml Date: Fri, 20 Nov 2026 23:40:42 +0800 Subject: [PATCH] =?UTF-8?q?fix(platform):=20=E6=94=BE=E5=A4=A7=E5=85=91?= =?UTF-8?q?=E6=8D=A2=E7=BB=93=E6=9E=9C=E5=9B=BE=E7=89=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/ExchangeResultImage.tsx | 35 +++++++++++++++---- .../src/pages/PlatformFulfillmentPage.tsx | 2 +- 2 files changed, 30 insertions(+), 7 deletions(-) diff --git a/web/frontend/src/components/ExchangeResultImage.tsx b/web/frontend/src/components/ExchangeResultImage.tsx index 79bc773..0b1a122 100644 --- a/web/frontend/src/components/ExchangeResultImage.tsx +++ b/web/frontend/src/components/ExchangeResultImage.tsx @@ -6,9 +6,10 @@ import { getExchangeImage } from '../utils/exchangeImage'; interface Props { task: DouyuTaskItem; onClick?: (task: DouyuTaskItem, url: string) => void; + variant?: 'compact' | 'detail'; } -export default function ExchangeResultImage({ task, onClick }: Props) { +export default function ExchangeResultImage({ task, onClick, variant = 'compact' }: Props) { const [url, setUrl] = useState(''); const [failed, setFailed] = useState(false); const [gen, setGen] = useState(0); @@ -34,18 +35,40 @@ export default function ExchangeResultImage({ task, onClick }: Props) { ); } if (!url) return ; + const detail = variant === 'detail'; return (
onClick?.(task, url)} - style={{ cursor: 'pointer', display: 'inline-block', lineHeight: 0 }} - title="点击查看大图并复制" + style={{ + cursor: onClick ? 'pointer' : 'default', + display: 'inline-block', + lineHeight: 0, + width: detail ? '100%' : undefined, + textAlign: detail ? 'center' : undefined, + }} + title={onClick ? '点击查看大图并复制' : undefined} > 兑换结果
); diff --git a/web/frontend/src/pages/PlatformFulfillmentPage.tsx b/web/frontend/src/pages/PlatformFulfillmentPage.tsx index 582486a..4b3551d 100644 --- a/web/frontend/src/pages/PlatformFulfillmentPage.tsx +++ b/web/frontend/src/pages/PlatformFulfillmentPage.tsx @@ -1348,7 +1348,7 @@ export default function PlatformFulfillmentPage() { ) : null} {douyuActionType === 'exchange_goods' && douyuActionTask.status === 'success' ? ( - + ) : null} ) : (