docs: explain common, dcim and kky resource upgrades

This commit is contained in:
cieanyau committed 2026-11-06 00:41:14 +08:00
1 parent 5ba081550c
commit 1e9f2d786b
3 files changed
+28

No files matched your search

+6
View File
@@ -1,4 +1,5 @@
<script>
// DCIM 资源升级表单:基于当前线路选择带宽、流量、IP、防御及可选硬件数量。
import "~/assets/styles/ConfigBandwidth.CWSH1WJZ.css";
import "~/assets/styles/DcimUpgrade.DaLApYFa.css";
import { toDisplayString } from "vue";
@@ -119,6 +120,7 @@ var T = {
},
].filter((e) => e.options.length),
);
// 档位既可能是离散值,也可能是区间;区间需要同时满足上下限和步长。
function ie(e, t) {
return (
Number.isFinite(e) &&
@@ -146,6 +148,7 @@ var T = {
function Z() {
(H++, (B.value = ``), (V.value = ``), (G = ``), (L.value = !1));
}
// 从当前实例恢复初值并保存基准快照,只有与基准不同的配置才需要询价。
function ae() {
for (let e of [`bw`, `flow`, `ip_num`, `peak_defence`])
F[e] = Number(O.current[e] ?? 0);
@@ -180,6 +183,7 @@ var T = {
e === U && (I.value = !1);
}
}
// 硬件数量只允许已有/可选项目,新增数量不得超剩余槽位;网络变更需匹配线路档位。
function oe() {
for (let e of N) {
let t = F[`optional_${e}`],
@@ -221,6 +225,7 @@ var T = {
)
throw Error(`请选择有效的${t.label}档位`);
}
// 询价接口使用扁平 optional_*[id] 参数,返回价格仅对当前配置快照有效。
async function $() {
if (O.upgradeAllowed === !1 || R.value || W || !J.value) return;
((z.value = ``), Z());
@@ -264,6 +269,7 @@ var T = {
e === H && (L.value = !1);
}
}
// 下单使用完整嵌套配置,并在报价、配置快照一致后把有效订单交给支付入口。
async function se() {
if (
O.upgradeAllowed === !1 ||