This commit is contained in:
eric
2026-03-13 05:51:29 -05:00
parent 8a095f7d45
commit 15dba690d3
9 changed files with 103 additions and 22 deletions

View File

@@ -84,12 +84,13 @@ export default function JoinPage() {
checkExisting();
}, []);
// 轮询到支付成功时跳转到 /join/paid,避免在 /join 重复显示成功页
usePayStatusPoll(() => {
// 轮询到支付成功时跳转到 /join/paid,携带 order_id 供 complete-order 使用
usePayStatusPoll((orderId) => {
if (typeof window === "undefined") return;
const path = window.location.pathname;
const paidPath = path.replace(/\/join\/?$/, "") + "/join/paid";
window.location.replace(paidPath);
const url = orderId ? `${paidPath}?order_id=${encodeURIComponent(orderId)}` : paidPath;
window.location.replace(url);
});
useEffect(() => {