From 0c9e7baca2d486f7249e8e09f59bae6fe8a2af35 Mon Sep 17 00:00:00 2001 From: pllx Date: Sat, 9 May 2026 11:28:19 +0800 Subject: [PATCH] =?UTF-8?q?=E7=B2=BE=E7=AE=80=E7=A7=81=E4=BF=A1=E8=AE=B0?= =?UTF-8?q?=E5=BD=95=E6=97=B6=E9=97=B4=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resources/js/chat-room/user-card.js | 11 +++++++++++ resources/views/chat/partials/user-actions.blade.php | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/resources/js/chat-room/user-card.js b/resources/js/chat-room/user-card.js index 1b94e77..7698ff7 100644 --- a/resources/js/chat-room/user-card.js +++ b/resources/js/chat-room/user-card.js @@ -121,6 +121,17 @@ export function userCardComponent() { return operatorPositionRank >= targetPositionRank; }, + /** 格式化私信记录时间,只保留到秒。 */ + formatWhisperTime(value) { + if (!value) { + return ""; + } + + const normalizedValue = String(value).replace("T", " ").replace(/\.\d+Z?$/, "").replace(/Z$/, ""); + + return normalizedValue.slice(0, 19); + }, + /** 返回名片资产字段的中文名称。 */ assetValueLabel(asset) { return { diff --git a/resources/views/chat/partials/user-actions.blade.php b/resources/views/chat/partials/user-actions.blade.php index 84308ed..96ae587 100644 --- a/resources/views/chat/partials/user-actions.blade.php +++ b/resources/views/chat/partials/user-actions.blade.php @@ -572,7 +572,7 @@ - +
暂无悄悄话记录