mirror of
https://github.com/rustdesk/doc.rustdesk.com.git
synced 2025-12-25 16:52:47 +00:00
pass query params to checkout
This commit is contained in:
parent
f3bb1fd29c
commit
c9dc9705a5
|
|
@ -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');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -35,7 +35,17 @@ const metadata = {
|
|||
cancelButtonText: 'Nein',
|
||||
}).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');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -35,7 +35,17 @@ const metadata = {
|
|||
cancelButtonText: 'No',
|
||||
}).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');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -35,7 +35,17 @@ const metadata = {
|
|||
cancelButtonText: 'Non',
|
||||
}).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');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -35,7 +35,17 @@ const metadata = {
|
|||
cancelButtonText: 'No',
|
||||
}).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');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -35,7 +35,18 @@ const metadata = {
|
|||
cancelButtonText: 'No',
|
||||
}).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) {
|
||||
// Fallback if URL API fails for any reason
|
||||
const qs = window.location.search ? (redirectUrl.includes('?') ? '&' : '?') + window.location.search.slice(1) : '';
|
||||
window.open(redirectUrl + qs, '_blank');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -35,7 +35,19 @@ const metadata = {
|
|||
cancelButtonText: 'Não',
|
||||
}).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');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,7 +37,22 @@ const metadata = {
|
|||
cancelButtonText: '否',
|
||||
}).then((result) => {
|
||||
if (result.isConfirmed) {
|
||||
window.open(redirectUrl + '¤cy=cny', '_blank');
|
||||
try {
|
||||
const url = new URL(redirectUrl);
|
||||
// Ensure currency=cny for zh-cn
|
||||
if (!url.searchParams.has('currency')) url.searchParams.set('currency', 'cny');
|
||||
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)
|
||||
: '';
|
||||
const sep = (redirectUrl + qs).includes('?') ? '&' : '?';
|
||||
window.open(redirectUrl + qs + sep + 'currency=cny', '_blank');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue