pass query params to checkout

This commit is contained in:
rustdesk
2025-10-25 16:31:43 +08:00
parent f3bb1fd29c
commit c9dc9705a5
11 changed files with 129 additions and 11 deletions

View File

@@ -35,7 +35,17 @@ const metadata = {
cancelButtonText: 'いいえ',
}).then((result) => {
if (result.isConfirmed) {
window.open(redirectUrl, '_blank');
try {
const url = new URL(redirectUrl);
const pageParams = new URLSearchParams(window.location.search);
pageParams.forEach((value, key) => {
if (!url.searchParams.has(key)) url.searchParams.append(key, value);
});
window.open(url.toString(), '_blank');
} catch (e) {
const qs = window.location.search ? (redirectUrl.includes('?') ? '&' : '?') + window.location.search.slice(1) : '';
window.open(redirectUrl + qs, '_blank');
}
}
});
}