mirror of
https://github.com/rustdesk/doc.rustdesk.com.git
synced 2026-05-19 08:00:13 +00:00
fix #custom2?years=2
This commit is contained in:
@@ -182,6 +182,22 @@ import { UI } from 'astrowind:config';
|
||||
|
||||
function loadPrice() {
|
||||
if (!document.getElementById('users')) return;
|
||||
// Migrate params from hash (e.g. #custom2?years=3) into the real query string
|
||||
// so gotoBuy/buildCheckoutUrl can forward them to checkout.
|
||||
if (window.location.hash.indexOf('?') >= 0) {
|
||||
const hash = window.location.hash;
|
||||
const qIdx = hash.indexOf('?');
|
||||
const hashAnchor = hash.slice(0, qIdx);
|
||||
const hashQuery = hash.slice(qIdx + 1);
|
||||
if (hashQuery) {
|
||||
const existing = new URLSearchParams(window.location.search);
|
||||
new URLSearchParams(hashQuery).forEach((v, k) => {
|
||||
if (!existing.has(k)) existing.append(k, v);
|
||||
});
|
||||
const qs = existing.toString();
|
||||
history.replaceState(null, '', window.location.pathname + (qs ? '?' + qs : '') + hashAnchor);
|
||||
}
|
||||
}
|
||||
let users = 10;
|
||||
let devices = 100;
|
||||
window.submit = function () {
|
||||
|
||||
@@ -392,9 +392,6 @@ const defaultCurrency = 'USD';
|
||||
try {
|
||||
var parsed = new URL(String(url), location.origin);
|
||||
if (parsed.pathname.startsWith(CHECKOUT_PATH)) {
|
||||
new URLSearchParams(location.search).forEach(function (v, k) {
|
||||
if (!parsed.searchParams.has(k)) parsed.searchParams.append(k, v);
|
||||
});
|
||||
var pending = {
|
||||
url: parsed.toString(),
|
||||
target: target,
|
||||
|
||||
Reference in New Issue
Block a user