mirror of
https://github.com/rustdesk/doc.rustdesk.com.git
synced 2026-04-19 06:39:54 +00:00
pass query params to checkout
This commit is contained in:
@@ -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');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user