更新小程序和管理后台配置,将 API 地址切换为生产环境。新增撤回打款功能,允许用户在特定状态下撤回打款请求,并优化相关页面交互。更新文档以反映新的流程图,确保用户体验一致性。
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
# 对接后端 base URL(不改 API 路径,仅改此处即可切换 Next → Gin)
|
||||
# 宝塔部署:若 API 站点开启了强制 HTTPS,这里必须用 https,否则预检请求会被重定向导致 CORS 报错
|
||||
# VITE_API_BASE_URL=http://localhost:3006
|
||||
VITE_API_BASE_URL=http://localhost:8080
|
||||
# VITE_API_BASE_URL=https://soulapi.quwanzhi.com
|
||||
# VITE_API_BASE_URL=http://localhost:8080
|
||||
VITE_API_BASE_URL=https://soulapi.quwanzhi.com
|
||||
|
||||
# VITE_API_BASE_URL=https://souldev.quwanzhi.com
|
||||
|
||||
|
||||
File diff suppressed because one or more lines are too long
2
soul-admin/dist/index.html
vendored
2
soul-admin/dist/index.html
vendored
@@ -4,7 +4,7 @@
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>管理后台 - Soul创业派对</title>
|
||||
<script type="module" crossorigin src="/assets/index-DCoaVA6V.js"></script>
|
||||
<script type="module" crossorigin src="/assets/index-ByhYXHAh.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="/assets/index-DGXqHqcA.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
@@ -32,7 +32,7 @@ import {
|
||||
DialogFooter,
|
||||
DialogTitle,
|
||||
} from '@/components/ui/dialog'
|
||||
import { get, put } from '@/api/client'
|
||||
import { get, put, post } from '@/api/client'
|
||||
|
||||
interface TodayClicksByPageItem {
|
||||
page: string
|
||||
@@ -387,6 +387,25 @@ export function DistributionPage() {
|
||||
setRejectReason('')
|
||||
}
|
||||
|
||||
async function handleCancelWithdrawal(id: string) {
|
||||
if (!confirm('确认撤回该笔打款?资金将退回商户运营账户。')) return
|
||||
try {
|
||||
const res = await post<{ success?: boolean; error?: string; message?: string }>(
|
||||
'/api/admin/withdrawals/cancel',
|
||||
{ id },
|
||||
)
|
||||
if (!res?.success) {
|
||||
toast.error(res?.error || res?.message || '撤回失败')
|
||||
return
|
||||
}
|
||||
toast.success('已撤回打款')
|
||||
await refreshCurrentTab()
|
||||
} catch (e) {
|
||||
console.error(e)
|
||||
toast.error('撤回失败')
|
||||
}
|
||||
}
|
||||
|
||||
async function submitRejectWithdrawal() {
|
||||
const id = rejectWithdrawalId
|
||||
if (!id) return
|
||||
@@ -1354,6 +1373,19 @@ export function DistributionPage() {
|
||||
</Button>
|
||||
</div>
|
||||
)}
|
||||
{(withdrawal.status === 'pending_confirm' || withdrawal.status === 'processing') && (
|
||||
<div className="flex gap-2 justify-end">
|
||||
<Button
|
||||
size="sm"
|
||||
variant="outline"
|
||||
onClick={() => handleCancelWithdrawal(withdrawal.id)}
|
||||
className="border-amber-500/50 text-amber-400 hover:bg-amber-500/20"
|
||||
>
|
||||
<Undo2 className="w-4 h-4 mr-1" />
|
||||
撤回打款
|
||||
</Button>
|
||||
</div>
|
||||
)}
|
||||
</td>
|
||||
</tr>
|
||||
))}
|
||||
|
||||
Reference in New Issue
Block a user