优化领取页第一步布局与第二步操作提示
- 去掉与顶部重复的商品信息,压缩间距便于一屏展示 - 移动端步骤指示器保持右上角 - 更新 UID、换绑角色增加悬浮功能说明
This commit is contained in:
@@ -178,15 +178,19 @@ function ClaimBindingStep({
|
|||||||
<Button size="large" icon={<ReloadOutlined />} loading={refreshingRole} onClick={onRefreshRole}>
|
<Button size="large" icon={<ReloadOutlined />} loading={refreshingRole} onClick={onRefreshRole}>
|
||||||
刷新角色信息
|
刷新角色信息
|
||||||
</Button>
|
</Button>
|
||||||
<Button
|
<Tooltip title="角色绑定错误时,请点击「换绑角色」,然后重新扫码绑定正确的角色">
|
||||||
size="large"
|
<span className="claim-action-tooltip-wrap">
|
||||||
icon={<SwapOutlined />}
|
<Button
|
||||||
loading={rebindingRole}
|
size="large"
|
||||||
disabled={confirmingRole || redeeming}
|
icon={<SwapOutlined />}
|
||||||
onClick={onRebindRole}
|
loading={rebindingRole}
|
||||||
>
|
disabled={confirmingRole || redeeming}
|
||||||
换绑角色
|
onClick={onRebindRole}
|
||||||
</Button>
|
>
|
||||||
|
换绑角色
|
||||||
|
</Button>
|
||||||
|
</span>
|
||||||
|
</Tooltip>
|
||||||
{snapshot.isUidMatched ? (
|
{snapshot.isUidMatched ? (
|
||||||
<Button
|
<Button
|
||||||
type="primary"
|
type="primary"
|
||||||
@@ -262,15 +266,19 @@ function ClaimConfirmStep({
|
|||||||
<Alert type="warning" showIcon message="兑换后不可取消,也不可退货。" />
|
<Alert type="warning" showIcon message="兑换后不可取消,也不可退货。" />
|
||||||
|
|
||||||
<Space size={12} wrap className="claim-action-row">
|
<Space size={12} wrap className="claim-action-row">
|
||||||
<Button
|
<Tooltip title="角色绑定错误时,请点击「换绑角色」,然后重新扫码绑定正确的角色">
|
||||||
size="large"
|
<span className="claim-action-tooltip-wrap">
|
||||||
icon={<SwapOutlined />}
|
<Button
|
||||||
loading={rebindingRole}
|
size="large"
|
||||||
disabled={redeeming}
|
icon={<SwapOutlined />}
|
||||||
onClick={onRebindRole}
|
loading={rebindingRole}
|
||||||
>
|
disabled={redeeming}
|
||||||
换绑角色
|
onClick={onRebindRole}
|
||||||
</Button>
|
>
|
||||||
|
换绑角色
|
||||||
|
</Button>
|
||||||
|
</span>
|
||||||
|
</Tooltip>
|
||||||
<Button
|
<Button
|
||||||
type="primary"
|
type="primary"
|
||||||
size="large"
|
size="large"
|
||||||
|
|||||||
@@ -333,7 +333,6 @@ export default function ClaimPage() {
|
|||||||
submitting={submittingUid}
|
submitting={submittingUid}
|
||||||
onChange={setUidInput}
|
onChange={setUidInput}
|
||||||
onSubmit={() => void handleSubmitUid()}
|
onSubmit={() => void handleSubmitUid()}
|
||||||
product={snapshot.product}
|
|
||||||
/>
|
/>
|
||||||
) : snapshot.hasRedeemResult ? (
|
) : snapshot.hasRedeemResult ? (
|
||||||
snapshot.isFeifeiFlow ? (
|
snapshot.isFeifeiFlow ? (
|
||||||
|
|||||||
@@ -1,6 +1,4 @@
|
|||||||
import { Button, Card, Input, Space, Typography } from 'antd'
|
import { Button, Card, Input, Space, Typography } from 'antd'
|
||||||
import type { ClaimProductInfo } from '@/types/claim'
|
|
||||||
import { ClaimProductItems, InfoTile } from './claim-shared'
|
|
||||||
import gameRoleIdGuide from '@/assets/claim/game-role-id-guide.jpg'
|
import gameRoleIdGuide from '@/assets/claim/game-role-id-guide.jpg'
|
||||||
|
|
||||||
export function ClaimUidStep({
|
export function ClaimUidStep({
|
||||||
@@ -8,29 +6,22 @@ export function ClaimUidStep({
|
|||||||
submitting,
|
submitting,
|
||||||
onChange,
|
onChange,
|
||||||
onSubmit,
|
onSubmit,
|
||||||
product,
|
|
||||||
}: {
|
}: {
|
||||||
uidInput: string
|
uidInput: string
|
||||||
submitting: boolean
|
submitting: boolean
|
||||||
onChange: (value: string) => void
|
onChange: (value: string) => void
|
||||||
onSubmit: () => void
|
onSubmit: () => void
|
||||||
product: ClaimProductInfo | null
|
|
||||||
}) {
|
}) {
|
||||||
return (
|
return (
|
||||||
<Card className="claim-content-card">
|
<Card className="claim-content-card claim-uid-step">
|
||||||
<Typography.Title level={2}>第 1 步:填写游戏编号(数字的那个)</Typography.Title>
|
<Typography.Title level={3} className="claim-uid-step-title">
|
||||||
<p className="claim-muted">
|
第 1 步:填写游戏编号(数字的那个)
|
||||||
请填写你要领取的游戏角色编号(纯数字)。提交后系统会按平台继续绑定或跳转领取。
|
</Typography.Title>
|
||||||
|
<p className="claim-muted claim-uid-step-desc">
|
||||||
|
请填写游戏内角色编号(纯数字),提交后继续绑定或领取。
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<div className="claim-info-grid claim-info-grid-compact">
|
<Space direction="vertical" size={10} style={{ width: '100%' }}>
|
||||||
<InfoTile label="领取商品" value={product?.title || '-'} />
|
|
||||||
<InfoTile label="商品数量" value={String(product?.quantity || 0)} />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<ClaimProductItems product={product} compact />
|
|
||||||
|
|
||||||
<Space direction="vertical" size={12} style={{ width: '100%' }}>
|
|
||||||
<Input
|
<Input
|
||||||
size="large"
|
size="large"
|
||||||
placeholder="请输入游戏编号(纯数字)"
|
placeholder="请输入游戏编号(纯数字)"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { Button, Input, Space } from 'antd'
|
import { Button, Input, Space, Tooltip } from 'antd'
|
||||||
import type { ClaimProductInfo } from '@/types/claim'
|
import type { ClaimProductInfo } from '@/types/claim'
|
||||||
|
|
||||||
export function ClaimProductItems({
|
export function ClaimProductItems({
|
||||||
@@ -51,13 +51,15 @@ export function UidEditRow({
|
|||||||
size="large"
|
size="large"
|
||||||
value={uidInput}
|
value={uidInput}
|
||||||
maxLength={64}
|
maxLength={64}
|
||||||
placeholder="游戏 UID"
|
placeholder="游戏编号"
|
||||||
onChange={(event) => onChange(event.target.value)}
|
onChange={(event) => onChange(event.target.value)}
|
||||||
onPressEnter={onSubmit}
|
onPressEnter={onSubmit}
|
||||||
/>
|
/>
|
||||||
<Button size="large" loading={submitting} onClick={onSubmit}>
|
<Tooltip title="游戏编号填错时,修改为正确编号后点击「更新 UID」即可">
|
||||||
更新 UID
|
<Button size="large" loading={submitting} onClick={onSubmit}>
|
||||||
</Button>
|
更新 UID
|
||||||
|
</Button>
|
||||||
|
</Tooltip>
|
||||||
</Space.Compact>
|
</Space.Compact>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -779,10 +779,25 @@ select {
|
|||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.claim-uid-step .ant-card-body {
|
||||||
|
gap: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.claim-uid-step-title.ant-typography {
|
||||||
|
margin: 0 !important;
|
||||||
|
font-size: 20px !important;
|
||||||
|
line-height: 1.3 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.claim-uid-step-desc {
|
||||||
|
font-size: 13px;
|
||||||
|
line-height: 1.45;
|
||||||
|
}
|
||||||
|
|
||||||
.claim-uid-guide {
|
.claim-uid-guide {
|
||||||
margin: 14px 0 0;
|
margin: 4px 0 0;
|
||||||
padding: 8px;
|
padding: 6px;
|
||||||
border-radius: 10px;
|
border-radius: 8px;
|
||||||
background: #f8fafc;
|
background: #f8fafc;
|
||||||
border: 1px solid #e5e7eb;
|
border: 1px solid #e5e7eb;
|
||||||
}
|
}
|
||||||
@@ -790,28 +805,81 @@ select {
|
|||||||
.claim-uid-guide-image {
|
.claim-uid-guide-image {
|
||||||
display: block;
|
display: block;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
max-width: 420px;
|
max-width: 360px;
|
||||||
|
max-height: 160px;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
border-radius: 8px;
|
border-radius: 6px;
|
||||||
border: 1px solid #e2e8f0;
|
border: 1px solid #e2e8f0;
|
||||||
object-fit: contain;
|
object-fit: contain;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
.claim-uid-guide-caption {
|
.claim-uid-guide-caption {
|
||||||
margin: 8px 0 0;
|
margin: 6px 0 0;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
color: #64748b;
|
color: #64748b;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
line-height: 1.4;
|
line-height: 1.35;
|
||||||
}
|
}
|
||||||
|
|
||||||
.claim-uid-warning {
|
.claim-uid-warning {
|
||||||
margin: 14px 0 0;
|
margin: 2px 0 0;
|
||||||
color: #ff4d4f;
|
color: #ff4d4f;
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
line-height: 1.5;
|
line-height: 1.45;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 480px) {
|
||||||
|
.claim-page {
|
||||||
|
padding: 12px;
|
||||||
|
gap: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.claim-header-card .ant-card-body,
|
||||||
|
.claim-content-card .ant-card-body {
|
||||||
|
gap: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.claim-header-copy {
|
||||||
|
/* 为右上角步骤条预留空间 */
|
||||||
|
padding-right: 112px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.claim-header-copy h1 {
|
||||||
|
font-size: 22px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.claim-step-indicator {
|
||||||
|
position: absolute;
|
||||||
|
top: 16px;
|
||||||
|
right: 16px;
|
||||||
|
max-width: 100px;
|
||||||
|
align-items: flex-end;
|
||||||
|
}
|
||||||
|
|
||||||
|
.claim-step-dot {
|
||||||
|
width: 26px;
|
||||||
|
height: 26px;
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.claim-step-dots {
|
||||||
|
gap: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.claim-step-progress-text {
|
||||||
|
text-align: right;
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.claim-uid-step-title.ant-typography {
|
||||||
|
font-size: 18px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.claim-uid-guide-image {
|
||||||
|
max-height: 140px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.claim-info-item {
|
.claim-info-item {
|
||||||
|
|||||||
Reference in New Issue
Block a user