feat(task): 任务详情与列表页增加H5订单号领取链接及兑换有效性控制
- 后端 AdminTaskDetail 视图补充关联订单的 claimStatus、claimStatusReason 等状态字段 - 任务详情页升级“领取链接”卡片:支持固定 H5 链接展示、状态标签(有效/暂停/关闭),并支持一键复制及【暂停/关闭/恢复启用】弹窗操作 - 任务详情页保留历史 Token 链接作为辅助对比展示 - 任务列表页在平台订单号旁增加一键复制 H5 领取链接的快捷按钮 - 验证方式:前后端类型检查、全量单元测试(后端 674、前端 132)及前后端全量构建均通过
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import {
|
||||
CloseCircleOutlined,
|
||||
CopyOutlined,
|
||||
ReloadOutlined,
|
||||
SearchOutlined,
|
||||
UserSwitchOutlined,
|
||||
@@ -124,7 +125,26 @@ export default function AdminTasksPage() {
|
||||
<Typography.Link onClick={() => navigate(`/admin/tasks/${row.taskId}`)}>
|
||||
{row.taskNo}
|
||||
</Typography.Link>
|
||||
<span className="muted">{row.platformOrderId}</span>
|
||||
<Space size={4}>
|
||||
<span className="muted">{row.platformOrderId}</span>
|
||||
{row.platformOrderId ? (
|
||||
<Button
|
||||
type="text"
|
||||
size="small"
|
||||
icon={<CopyOutlined />}
|
||||
title="复制 H5 领取链接"
|
||||
style={{ padding: 0, height: 'auto', color: '#64748b' }}
|
||||
onClick={(e) => {
|
||||
e.stopPropagation()
|
||||
const h5Url = `${window.location.origin}/h5/${encodeURIComponent(row.platformOrderId)}`
|
||||
navigator.clipboard
|
||||
.writeText(h5Url)
|
||||
.then(() => message.success('已复制 H5 领取链接: ' + h5Url))
|
||||
.catch(() => message.error('复制失败,请手动复制'))
|
||||
}}
|
||||
/>
|
||||
) : null}
|
||||
</Space>
|
||||
</div>
|
||||
),
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user