's'
This commit is contained in:
@@ -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(() => {
|
||||
|
||||
Reference in New Issue
Block a user