chore: prepare production release package

This commit is contained in:
wushumin
2026-06-05 16:12:56 +08:00
parent ed87ea1541
commit 995eae3969
15 changed files with 740 additions and 37 deletions

View File

@@ -73,7 +73,6 @@ const productSpecItems = computed(() => {
appendSpecItem(items, "品牌", product.brand_name);
appendSpecItem(items, "颜色", product.color);
appendSpecItem(items, "规格/尺寸", product.size_spec);
appendSpecItem(items, "序列号/编码", product.serial_no);
for (const point of normalizedKeyPoints(result.key_points)) {
if (hasSpecItem(items, point.point_name)) continue;
@@ -102,11 +101,12 @@ function appendSpecItem(
value: unknown,
remark: unknown = "",
) {
const labelText = textValue(label);
const valueText = textValue(value);
const remarkText = textValue(remark);
if (!valueText && !remarkText) return;
if (!labelText || isHiddenProductSpecLabel(labelText) || (!valueText && !remarkText)) return;
items.push({
label,
label: labelText,
value: valueText || "-",
remark: remarkText,
});
@@ -121,6 +121,11 @@ function textValue(value: unknown) {
return String(value ?? "").trim();
}
function isHiddenProductSpecLabel(label: string) {
const normalized = label.replace(/\s+/g, "");
return normalized === "序列号" || normalized === "序列号/编码";
}
function normalizedKeyPoints(value: unknown) {
if (!Array.isArray(value)) return [];
return value