diff --git a/h5/bd-leader-center/index.html b/h5/bd-leader-center/index.html index d1a8e1d..6b00453 100644 --- a/h5/bd-leader-center/index.html +++ b/h5/bd-leader-center/index.html @@ -7,8 +7,13 @@ - \ No newline at end of file + diff --git a/h5/hyapp/bd-leader-center/index.html b/h5/hyapp/bd-leader-center/index.html index 9249863..8e43d66 100644 --- a/h5/hyapp/bd-leader-center/index.html +++ b/h5/hyapp/bd-leader-center/index.html @@ -168,6 +168,6 @@ - + diff --git a/h5/hyapp/bd-leader-center/script.js b/h5/hyapp/bd-leader-center/script.js index 1f71348..0e8ff8f 100644 --- a/h5/hyapp/bd-leader-center/script.js +++ b/h5/hyapp/bd-leader-center/script.js @@ -679,7 +679,7 @@ more.className = "more-button"; more.type = "button"; more.textContent = message("more"); - more.addEventListener("click", () => showHistoryMore(item?.billBelong)); + more.addEventListener("click", () => showHistoryMore(item)); row.appendChild(more); } return row; @@ -739,6 +739,7 @@ function normalizeDateText(value) { return digitMaps.reduce((textValue, [from, to]) => textValue.split(from).join(to), String(value || "")) + .replace(/&/gi, "&") .replace(/&(?:rlm|lrm);/gi, "") .replace(/ /gi, " ") .replace(/[\u061c\u200e\u200f]/g, "") @@ -762,6 +763,7 @@ function normalizeBillBelong(value) { const textValue = normalizeDateText(value); if (!textValue) return ""; + if (/^\d{6,8}$/.test(textValue)) return textValue; const isoMatch = textValue.match(/^(\d{4})-(\d{2})-(\d{2})(?:[ T](\d{2}):(\d{2})(?::(\d{2}))?)?/); if (isoMatch) { @@ -804,8 +806,8 @@ return ""; } - function historyMorePath(billBelong) { - const normalized = normalizeBillBelong(billBelong); + function historyMorePath(source) { + const normalized = normalizeBillBelong(source?.billBelong ?? source?.period ?? source?.billTitle ?? source); return normalized ? `/team/bd/leader/history/more?billBelong=${encodeURIComponent(normalized)}` : ""; }