docs: annotate remaining routes layouts and view boundaries

This commit is contained in:
cieanyau committed 2026-11-06 00:34:17 +08:00
1 parent 408f8e5c98
commit ab22d406c0
56 files changed
+403

No files matched your search

@@ -1,4 +1,7 @@
<script>
/**
* 物理服务器选型:汇总可售物理商品、机型与地区线路,支持规格/价格筛选,选择线路后进入独立定制页。
*/
import "~/assets/styles/dedicated-server.CiJfMYtk.css";
import { toDisplayString } from "vue";
import { renderList } from "vue";
@@ -29,6 +32,7 @@ import { n as product_name_n } from "~/lib/product-name.js";
import inputnumber from "primevue/inputnumber";
import tag from "primevue/tag";
import skeleton from "primevue/skeleton";
// 只识别本地或资源模块映射到 mf_dcim 的物理商品;未知模块不强行套用配置器。
function O(e) {
let t = e.module?.trim() || ``;
return t === `mf_dcim` || t === `remf_dcim`
@@ -37,6 +41,7 @@ function O(e) {
? `remf_dcim`
: void 0;
}
// 封装选型数据、筛选和线路详情,列表请求与选中线路请求使用独立序号。
function k() {
let e = useApi(),
t = ref(!0),
@@ -103,6 +108,7 @@ function k() {
onBeforeUnmount(() => {
((S = !0), y++, b++);
});
// 只清除筛选草稿,不修改服务端商品。
function C() {
Object.assign(p, {
minPrice: null,
@@ -114,6 +120,7 @@ function k() {
disk: ``,
});
}
// 商品库存与自动同步的机型库存都满足时才允许选购。
function w(e) {
return (
!(e.product.stock_control === 1 && Number(e.product.qty) <= 0) &&
@@ -124,6 +131,7 @@ function k() {
)
);
}
// 分页收集商品后并行加载物理模块配置;单个商品失败保留其余可用项并提示部分加载失败。
async function T() {
let a = ++y;
(b++,
@@ -200,6 +208,7 @@ function k() {
!S && a === y && (t.value = !1);
}
}
// 按当前机型读取各线路详情,快速改选时只接纳最新选择的结果。
async function E(t) {
o.value = m(t);
let n = ++b;
@@ -219,6 +228,7 @@ function k() {
(l.value = !1));
}
}
// 关闭机型选择并使尚未完成的线路请求失效。
function D() {
(b++, (o.value = ``), (c.value = {}), (l.value = !1), (f.value = ``));
}
@@ -382,16 +392,19 @@ var te = {
label: `硬盘`,
},
];
// 只有明确有效的商品价格才显示金额,缺失时提示配置后确认。
function xe(e) {
return e !== void 0 && e.trim() !== `` && Number.isFinite(Number(e))
? `¥ ${Number(e).toFixed(2)}`
: `价格待配置`;
}
// 定制链接携带当前商品、机型及所选线路 ID,最终仍由配置页加载并验证商品。
function Se(e) {
return `/products/dedicated-server/customize?id=${C.value?.product.id}&model_id=${C.value?.model.id}&line_id=${e}`;
}
return (
onMounted(s.load),
// 机型筛选卡、线路详情和定制入口共享当前选择;部分配置读取失败有单独反馈,不伪装成无库存。
(n, r) => {
let a = NuxtLink,
k = inputnumber,