开通新账号
老账号充值
选择云平台
☁️阿里云
🐧腾讯云
📦亚马逊 AWS
🌐谷歌 GCP
实付金额
$0.00
赠送金额
+$0.00
实际到账
$0.00
正在验证账号...
实付金额
$0.00
赠送金额
+$0.00
实际到账
$0.00
+ a + '').join(''); newHtml += ''; $("#quick-amounts-new").html(newHtml); let oldHtml = amountsOld.map(a => '
function syncActiveQuickAmount() { let valNew = currentNewAmount; $("#quick-amounts-new .btn-amount").each(function() { $(this).toggleClass("active", $(this).data("val") == valNew); }); let valOld = currentOldAmount; $("#quick-amounts-old .btn-amount").each(function() { $(this).toggleClass("active", $(this).data("val") == valOld); }); } $(document).on("click", ".btn-amount", function() { let val = $(this).data("val"); if ($(this).parent().attr("id") === "quick-amounts-new") { $("#amount").val(val).trigger("input"); } else { $("#amount2").val(val).trigger("input"); } }); // Initialize UI setTimeout(function() { renderQuickAmounts(); checkLimits(); }, 100); // Tab Switch $(".rc-tab").on("click", function() { $(".rc-tab").removeClass("active"); $(this).addClass("active"); $(".rc-pane").removeClass("active"); $("#" + $(this).data("target")).addClass("active"); checkLimits(); }); // Cloud Provider Switch $(".cloud-item").on("click", function() { $(".cloud-item").removeClass("active"); $(this).addClass("active"); currentCloudType = $(this).data("cloudtype"); $("#get-accountadd-submit, #add-funds-submit").attr("data-cloudtype", currentCloudType); if (currentCloudType == 5) { $("#email-group").slideDown(200); } else { $("#email-group").slideUp(200); $("#email").val(""); } renderQuickAmounts(); checkLimits(); if ($("#pane-old").hasClass("active") && $("#account").val().trim() !== "") { $("#account").trigger("blur"); } }); $("#amount").on("input", function() { let money = parseFloat($(this).val()) || 0; // Default logic to match the requested fixed bonus if possible, // but dynamic based on inverse discount calculation. // 200 / 0.95 = 210.52 -> bonus 10.52 -> round 11 -> credited 211 // 500 / 0.90 = 555.55 -> bonus 55.55 -> round 56 -> credited 556 // 1000 / 0.85 = 1176.47 -> bonus 176.47 -> round 176 -> credited 1176 let discountRate = 1; if(money >= 1000) discountRate = 0.85; else if(money >= 500) discountRate = 0.90; else if(money >= 100) discountRate = 0.95; let pay = money.toFixed(2); let bonus = 0; if (discountRate < 1) { let rawCredited = money / discountRate; bonus = Math.round(rawCredited - money); } let credited = (money + bonus).toFixed(2); $("#payAmount").text(pay); $("#bonusAmount").text(bonus.toFixed(2)); $("#creditedAmount").text(credited); syncActiveQuickAmount(); checkLimits(); }); $("#get-accountadd-submit").on("click", function() { if($(this).hasClass("disabled")) return; var btnCloudType = $(this).attr("data-cloudtype"); var requestfunc = btnCloudType == 1 ? "cnmhao10002" : btnCloudType == 2 ? "cnmhao20002" : btnCloudType == 3 ? "cnmhao30002" : btnCloudType == 5 ? "cnmhao80002" : ""; let money = currentNewAmount; let email = $("#email").val().trim(); if (!money || parseFloat(money) < getMinAmount(true, currentCloudType)) { toasttext = "不满足最低充值要求 $" + getMinAmount(true, currentCloudType) + "!"; totoast(); return; } if (btnCloudType == 5) { if (!email || (!email.toLowerCase().endsWith("@gmail.com") && !email.toLowerCase().endsWith("@googlemail.com"))) { toasttext = "请提供有效的谷歌邮箱 (@gmail.com)!"; totoast(); return; } } else { email = ""; } let $btn = $(this); $btn.text("处理中...").css("opacity", 0.7); $.ajax({ url: "https://regouyun.com/api/cloud", type: "POST", contentType: "application/json", data: JSON.stringify({ reqhead: { requesttype: "500", requestfunc: requestfunc, requesttime: new Date().toISOString().slice(0, 19), requestterminal: "1", version: "yxd1.0.0" }, reqbody: Base64.encode(JSON.stringify({ region: "", params: { price: money, account: "", yxd_domain_name: "regouyun.com", email: email, haoMark: "yunpipi.com" }, cloudType: "10" })) }), success: function(response) { $btn.text("立即开户并充值").css("opacity", 1); if (response.resphead.msgcode === "200") { const discountData = JSON.parse(Base64.decode(response.respbody)); let url = "Payment.html?orderId=" + encodeURIComponent(discountData.rows?.orderId) + "&cloudType=" + encodeURIComponent(btnCloudType) + "&payAmount=" + encodeURIComponent($("#payAmount").text()) + "&bonusAmount=" + encodeURIComponent($("#bonusAmount").text()) + "&creditedAmount=" + encodeURIComponent($("#creditedAmount").text()); window.location.href = url; } else { toasttext = "订单创建失败: " + (response.resphead.msgcontent || "未知错误"); totoast(); } }, error: function() { $btn.text("立即开户并充值").css("opacity", 1); toasttext = "网络请求失败,请稍后再试!"; totoast(); } }); }); function getCustomerDiscount(account, btnCloudType) { var requestfunc = btnCloudType == 1 ? "40000000009" : btnCloudType == 2 ? "40000000011" : btnCloudType == 3 ? "AwsCnm10000000002" : btnCloudType == 5 ? "GcpCnm10000000000" : ""; const reqobj = { region: "", params: { account: account }, cloudType: "10" }; const reqobject = { reqhead: { verifycode: "", requesttype: "500", requestfunc: requestfunc, requesttime: new Date().toISOString().slice(0, 19).replace("T", " "), requestserver: "", requestip: "", requestterminal: "1", version: "yxd1.0.0" }, reqbody: Base64.encode(JSON.stringify(reqobj)) }; $.ajax({ url: "https://regouyun.com/api/cloud", type: "POST", dataType: "json", contentType: "application/json", data: JSON.stringify(reqobject), success: function(data) { if (data.resphead.msgcode === "200") { $("#account-tip").css("color", "var(--primary)").text("✓ 账户验证通过").show(); $(".amount-container").css({ "opacity": 1, "pointer-events": "auto", "cursor": "auto" }); isAccountVerified = true; let pData = data.respbody; try { pData = JSON.parse(Base64.decode(data.respbody)); } catch(e) { try { pData = JSON.parse(data.respbody); } catch(e){} } rechargeState.czdiscount = pData.discount || 1; rechargeState.czbalance = pData.balance || 0; if (rechargeState.czdiscount < 1) $("#bonust").show(); else $("#bonust").hide(); $("#amount2").trigger("input"); } else { $("#account-tip").css("color", "#e74c3c").text("❌ 账户未关联平台或无效").show(); $(".amount-container").css({ "opacity": 0.3, "pointer-events": "none", "cursor": "not-allowed" }); isAccountVerified = false; checkLimits(); } }, error: function() { $("#account-tip").css("color", "#e74c3c").text("网络验证超时,请重试").show(); isAccountVerified = false; checkLimits(); } }); } $("#account").on("blur", function() { let account = $(this).val().trim(); if(account) { $("#account-tip").css("color", "var(--light-text)").text("正在验证账号...").show(); getCustomerDiscount(account, currentCloudType); } else { $("#account-tip").hide(); $(".amount-container").css({ "opacity": 0.3, "pointer-events": "none", "cursor": "not-allowed" }); isAccountVerified = false; checkLimits(); } }); $("#amount2").on("input", function() { let money = parseFloat($(this).val()) || 0; let discountRate = rechargeState.czdiscount || 1; let pay = money.toFixed(2); let credited = discountRate < 1 ? (money / discountRate).toFixed(2) : money.toFixed(2); let bonus = (credited - money).toFixed(2); $("#payAmount2").text(pay); $("#bonusAmount2").text(bonus); $("#creditedAmount2").text(credited); syncActiveQuickAmount(); checkLimits(); }); $("#add-funds-submit").on("click", function() { if($(this).hasClass("disabled")) return; var btnCloudType = $(this).attr("data-cloudtype"); var requestfunc = btnCloudType == 1 ? "40000000002" : btnCloudType == 2 ? "cnmhao20002" : btnCloudType == 3 ? "cnmhao30002" : btnCloudType == 5 ? "cnmhao80002" : ""; let money = currentOldAmount; let accountuid = $("#account").val(); if(!money || parseFloat(money) < getMinAmount(false, currentCloudType) || !accountuid) { toasttext = "不满足最低充值要求 $" + getMinAmount(false, currentCloudType) + "!"; totoast(); return; } let $btn = $(this); $btn.text("处理中...").css("opacity", 0.7); $.ajax({ url: "https://regouyun.com/api/cloud", type: "POST", contentType: "application/json", data: JSON.stringify({ reqhead: { requesttype: "500", requestfunc: requestfunc, requesttime: new Date().toISOString().slice(0, 19), requestterminal: "1", version: "yxd1.0.0" }, reqbody: Base64.encode(JSON.stringify({ region: "", params: { money: money, account: accountuid }, cloudType: "10" })) }), success: function(response) { $btn.text("立即充值").css("opacity", 1); if (response.resphead.msgcode === "200") { const discountData = JSON.parse(Base64.decode(response.respbody)); let url = "Payment2.html?orderId=" + encodeURIComponent(discountData.rows?.orderId) + "&cloudType=" + encodeURIComponent(btnCloudType) + "&payAmount=" + encodeURIComponent($("#payAmount2").text()) + "&bonusAmount=" + encodeURIComponent($("#bonusAmount2").text()) + "&creditedAmount=" + encodeURIComponent($("#creditedAmount2").text()); window.location.href = url; } else { toasttext = "订单创建失败: " + (response.resphead.msgcontent || "未知错误"); totoast(); } }, error: function() { $btn.text("立即充值").css("opacity", 1); toasttext = "网络请求失败,请稍后再试!"; totoast(); } }); }); // Initial setup for hamburger document.getElementById('mobile-menu-btn').addEventListener('click', function() { document.getElementById('nav-links').classList.toggle('active'); }); + a + '
').join(''); oldHtml += ''; $("#quick-amounts-old").html(oldHtml); syncActiveQuickAmount(); // Re-bind input events since elements are re-created dynamically $("#amount").off("input").on("input", handleAmountNewInput); $("#amount2").off("input").on("input", handleAmountOldInput); } function syncActiveQuickAmount() { let valNew = currentNewAmount; $("#quick-amounts-new .btn-amount").each(function() { $(this).toggleClass("active", $(this).data("val") == valNew); }); let valOld = currentOldAmount; $("#quick-amounts-old .btn-amount").each(function() { $(this).toggleClass("active", $(this).data("val") == valOld); }); } $(document).on("click", ".btn-amount", function() { let val = $(this).data("val"); if ($(this).parent().attr("id") === "quick-amounts-new") { $("#amount").val(val).trigger("input"); } else { $("#amount2").val(val).trigger("input"); } }); // Initialize UI setTimeout(function() { renderQuickAmounts(); checkLimits(); }, 100); // Tab Switch $(".rc-tab").on("click", function() { $(".rc-tab").removeClass("active"); $(this).addClass("active"); $(".rc-pane").removeClass("active"); $("#" + $(this).data("target")).addClass("active"); checkLimits(); }); // Cloud Provider Switch $(".cloud-item").on("click", function() { $(".cloud-item").removeClass("active"); $(this).addClass("active"); currentCloudType = $(this).data("cloudtype"); $("#get-accountadd-submit, #add-funds-submit").attr("data-cloudtype", currentCloudType); if (currentCloudType == 5) { $("#email-group").slideDown(200); } else { $("#email-group").slideUp(200); $("#email").val(""); } renderQuickAmounts(); checkLimits(); if ($("#pane-old").hasClass("active") && $("#account").val().trim() !== "") { $("#account").trigger("blur"); } }); $("#amount").on("input", function() { let money = parseFloat($(this).val()) || 0; // Default logic to match the requested fixed bonus if possible, // but dynamic based on inverse discount calculation. // 200 / 0.95 = 210.52 -> bonus 10.52 -> round 11 -> credited 211 // 500 / 0.90 = 555.55 -> bonus 55.55 -> round 56 -> credited 556 // 1000 / 0.85 = 1176.47 -> bonus 176.47 -> round 176 -> credited 1176 let discountRate = 1; if(money >= 1000) discountRate = 0.85; else if(money >= 500) discountRate = 0.90; else if(money >= 100) discountRate = 0.95; let pay = money.toFixed(2); let bonus = 0; if (discountRate < 1) { let rawCredited = money / discountRate; bonus = Math.round(rawCredited - money); } let credited = (money + bonus).toFixed(2); $("#payAmount").text(pay); $("#bonusAmount").text(bonus.toFixed(2)); $("#creditedAmount").text(credited); syncActiveQuickAmount(); checkLimits(); }); $("#get-accountadd-submit").on("click", function() { if($(this).hasClass("disabled")) return; var btnCloudType = $(this).attr("data-cloudtype"); var requestfunc = btnCloudType == 1 ? "cnmhao10002" : btnCloudType == 2 ? "cnmhao20002" : btnCloudType == 3 ? "cnmhao30002" : btnCloudType == 5 ? "cnmhao80002" : ""; let money = currentNewAmount; let email = $("#email").val().trim(); if (!money || parseFloat(money) < getMinAmount(true, currentCloudType)) { toasttext = "不满足最低充值要求 $" + getMinAmount(true, currentCloudType) + "!"; totoast(); return; } if (btnCloudType == 5) { if (!email || (!email.toLowerCase().endsWith("@gmail.com") && !email.toLowerCase().endsWith("@googlemail.com"))) { toasttext = "请提供有效的谷歌邮箱 (@gmail.com)!"; totoast(); return; } } else { email = ""; } let $btn = $(this); $btn.text("处理中...").css("opacity", 0.7); $.ajax({ url: "https://regouyun.com/api/cloud", type: "POST", contentType: "application/json", data: JSON.stringify({ reqhead: { requesttype: "500", requestfunc: requestfunc, requesttime: new Date().toISOString().slice(0, 19), requestterminal: "1", version: "yxd1.0.0" }, reqbody: Base64.encode(JSON.stringify({ region: "", params: { price: money, account: "", yxd_domain_name: "regouyun.com", email: email, haoMark: "yunpipi.com" }, cloudType: "10" })) }), success: function(response) { $btn.text("立即开户并充值").css("opacity", 1); if (response.resphead.msgcode === "200") { const discountData = JSON.parse(Base64.decode(response.respbody)); let url = "Payment.html?orderId=" + encodeURIComponent(discountData.rows?.orderId) + "&cloudType=" + encodeURIComponent(btnCloudType) + "&payAmount=" + encodeURIComponent($("#payAmount").text()) + "&bonusAmount=" + encodeURIComponent($("#bonusAmount").text()) + "&creditedAmount=" + encodeURIComponent($("#creditedAmount").text()); window.location.href = url; } else { toasttext = "订单创建失败: " + (response.resphead.msgcontent || "未知错误"); totoast(); } }, error: function() { $btn.text("立即开户并充值").css("opacity", 1); toasttext = "网络请求失败,请稍后再试!"; totoast(); } }); }); function getCustomerDiscount(account, btnCloudType) { var requestfunc = btnCloudType == 1 ? "40000000009" : btnCloudType == 2 ? "40000000011" : btnCloudType == 3 ? "AwsCnm10000000002" : btnCloudType == 5 ? "GcpCnm10000000000" : ""; const reqobj = { region: "", params: { account: account }, cloudType: "10" }; const reqobject = { reqhead: { verifycode: "", requesttype: "500", requestfunc: requestfunc, requesttime: new Date().toISOString().slice(0, 19).replace("T", " "), requestserver: "", requestip: "", requestterminal: "1", version: "yxd1.0.0" }, reqbody: Base64.encode(JSON.stringify(reqobj)) }; $.ajax({ url: "https://regouyun.com/api/cloud", type: "POST", dataType: "json", contentType: "application/json", data: JSON.stringify(reqobject), success: function(data) { if (data.resphead.msgcode === "200") { $("#account-tip").css("color", "var(--primary)").text("✓ 账户验证通过").show(); $(".amount-container").css({ "opacity": 1, "pointer-events": "auto", "cursor": "auto" }); isAccountVerified = true; let pData = data.respbody; try { pData = JSON.parse(Base64.decode(data.respbody)); } catch(e) { try { pData = JSON.parse(data.respbody); } catch(e){} } rechargeState.czdiscount = pData.discount || 1; rechargeState.czbalance = pData.balance || 0; if (rechargeState.czdiscount < 1) $("#bonust").show(); else $("#bonust").hide(); $("#amount2").trigger("input"); } else { $("#account-tip").css("color", "#e74c3c").text("❌ 账户未关联平台或无效").show(); $(".amount-container").css({ "opacity": 0.3, "pointer-events": "none", "cursor": "not-allowed" }); isAccountVerified = false; checkLimits(); } }, error: function() { $("#account-tip").css("color", "#e74c3c").text("网络验证超时,请重试").show(); isAccountVerified = false; checkLimits(); } }); } $("#account").on("blur", function() { let account = $(this).val().trim(); if(account) { $("#account-tip").css("color", "var(--light-text)").text("正在验证账号...").show(); getCustomerDiscount(account, currentCloudType); } else { $("#account-tip").hide(); $(".amount-container").css({ "opacity": 0.3, "pointer-events": "none", "cursor": "not-allowed" }); isAccountVerified = false; checkLimits(); } }); $("#amount2").on("input", function() { let money = parseFloat($(this).val()) || 0; let discountRate = rechargeState.czdiscount || 1; let pay = money.toFixed(2); let credited = discountRate < 1 ? (money / discountRate).toFixed(2) : money.toFixed(2); let bonus = (credited - money).toFixed(2); $("#payAmount2").text(pay); $("#bonusAmount2").text(bonus); $("#creditedAmount2").text(credited); syncActiveQuickAmount(); checkLimits(); }); $("#add-funds-submit").on("click", function() { if($(this).hasClass("disabled")) return; var btnCloudType = $(this).attr("data-cloudtype"); var requestfunc = btnCloudType == 1 ? "40000000002" : btnCloudType == 2 ? "cnmhao20002" : btnCloudType == 3 ? "cnmhao30002" : btnCloudType == 5 ? "cnmhao80002" : ""; let money = currentOldAmount; let accountuid = $("#account").val(); if(!money || parseFloat(money) < getMinAmount(false, currentCloudType) || !accountuid) { toasttext = "不满足最低充值要求 $" + getMinAmount(false, currentCloudType) + "!"; totoast(); return; } let $btn = $(this); $btn.text("处理中...").css("opacity", 0.7); $.ajax({ url: "https://regouyun.com/api/cloud", type: "POST", contentType: "application/json", data: JSON.stringify({ reqhead: { requesttype: "500", requestfunc: requestfunc, requesttime: new Date().toISOString().slice(0, 19), requestterminal: "1", version: "yxd1.0.0" }, reqbody: Base64.encode(JSON.stringify({ region: "", params: { money: money, account: accountuid }, cloudType: "10" })) }), success: function(response) { $btn.text("立即充值").css("opacity", 1); if (response.resphead.msgcode === "200") { const discountData = JSON.parse(Base64.decode(response.respbody)); let url = "Payment2.html?orderId=" + encodeURIComponent(discountData.rows?.orderId) + "&cloudType=" + encodeURIComponent(btnCloudType) + "&payAmount=" + encodeURIComponent($("#payAmount2").text()) + "&bonusAmount=" + encodeURIComponent($("#bonusAmount2").text()) + "&creditedAmount=" + encodeURIComponent($("#creditedAmount2").text()); window.location.href = url; } else { toasttext = "订单创建失败: " + (response.resphead.msgcontent || "未知错误"); totoast(); } }, error: function() { $btn.text("立即充值").css("opacity", 1); toasttext = "网络请求失败,请稍后再试!"; totoast(); } }); }); // Initial setup for hamburger document.getElementById('mobile-menu-btn').addEventListener('click', function() { document.getElementById('nav-links').classList.toggle('active'); });