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 @@ - +
暂无悄悄话记录