From 36b3ba6f452740ccaedc1418e86086e96f074ea2 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 9 Oct 2026 18:12:48 +0800 Subject: [PATCH] =?UTF-8?q?fix(after-sale):=20=E8=AE=A2=E5=8D=95=E8=AF=A6?= =?UTF-8?q?=E6=83=85=E5=BC=B9=E7=AA=97=E4=B8=8D=E5=86=8D=E6=B8=B2=E6=9F=93?= =?UTF-8?q?=E5=94=AE=E5=90=8E=E7=8A=B6=E6=80=81=E8=8A=82=E7=82=B9=E8=BF=9B?= =?UTF-8?q?=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 订单详情弹窗的「售后记录」卡片把整条处理时间线铺在了卡片里,和点开 「查看详细」后的售后详细弹窗重复,卡片本身也被拉得很长。改为只保留状态 徽章 + 申请时间、原因/申请理由、退款金额与「查看详细」入口;完整处理记录 由售后详细弹窗独占呈现,信息不缺、入口也还在。 - 删掉卡片里的 orderDetailHandlingLogHtml(item.handling_log) 调用 - 连带删除随之无人调用的 orderDetailHandlingLogHtml / handlingEntryTitle / AFTER_SALE_STATUS_LABELS 三个助手 - recordPayload 仍带 handling_log,点开详情弹窗照旧能看到时间线 - modal-runtime.css 的时间线规则不动:售后详细弹窗还在用,无需重打包 验证:tests/widget-system/ 462 项、tests/admin/ 76 项通过;契约测试改为断言 订单详情弹窗不再出现 timeline 标记与三个助手,同时锁住「查看详细」载荷仍带 handling_log;node --check 通过。未做浏览器视觉验收。 --- assets/js/order-center.js | 35 ------------------- .../after-sale-policy-contract.test.cjs | 11 ++++-- 2 files changed, 8 insertions(+), 38 deletions(-) diff --git a/assets/js/order-center.js b/assets/js/order-center.js index 1cc948ee..f29ae04c 100644 --- a/assets/js/order-center.js +++ b/assets/js/order-center.js @@ -111,39 +111,6 @@ return order && order.is_points ? amount + " " + String(order.currency_symbol || "积分") : "¥" + amount; } - // 处理记录时间线:与售后详细弹窗(order-after-sale.js)同款标记与样式, - // 由 modal-runtime.css 的 .aksrt-after-sale-timeline 规则统一呈现。 - var AFTER_SALE_STATUS_LABELS = { pending: "待审核", processing: "处理中", rejected: "已拒绝", cancelled: "已取消", completed: "已完成" }; - function handlingEntryTitle(entry) { - var status = String((entry && entry.status) || ""); - if (String((entry && entry.source) || "") === "user") { - return status === "cancelled" ? "用户撤销售后" : "用户提交申请"; - } - return AFTER_SALE_STATUS_LABELS[status] || status; - } - function orderDetailHandlingLogHtml(log) { - var entries = Array.isArray(log) ? log : []; - if (!entries.length) return ""; - var html = '
    '; - entries.forEach(function (entry) { - var status = String((entry && entry.status) || ""); - var note = String((entry && entry.note) || ""); - html += '
  1. '; - html += ''; - html += '
    '; - // [节点][处理状态][时间] 同一行,处理备注另起一行 - html += '
    ' + - '' + escapeHtml(handlingEntryTitle(entry)) + '' + - '' + - '
    '; - if (note !== "") { - html += '

    ' + escapeHtml(note).replace(/\r\n|\r|\n/g, "
    ") + '

    '; - } - html += '
  2. '; - }); - return html + '
'; - } - function colorfulHeader(title, icon) { return '