From abee09555f50b17af8c47e1208afdba2a6181b45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=A2=E8=B6=8A?= <552369664@qq.com> Date: Wed, 21 Aug 2024 13:13:17 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E3=80=90=E5=8A=9F=E8=83=BD=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E3=80=91=E5=A4=84=E7=90=86dayjs=E7=9A=84format?= =?UTF-8?q?=E9=97=AE=E9=A2=98=EF=BC=8C=E5=85=B7=E4=BD=93=E6=95=88=E6=9E=9C?= =?UTF-8?q?=E5=8F=82=E8=80=83=E5=95=86=E5=9F=8E=E5=AE=A2=E6=9C=8D=E7=9A=84?= =?UTF-8?q?=E4=BC=9A=E8=AF=9D=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/formatTime.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/formatTime.ts b/src/utils/formatTime.ts index 134a986e0..a13cfd6b0 100644 --- a/src/utils/formatTime.ts +++ b/src/utils/formatTime.ts @@ -69,7 +69,7 @@ export function formatDate(date: Date, format?: string): string { return '' } // 日期存在,则进行格式化 - return date ? dayjs(date).format(format ?? 'YYYY-MM-DD HH:mm:ss') : '' + return date ? dayjs(date).format((format?.includes("YYYY-mm-dd") ? format.replace("YYYY-mm-dd", "YYYY-MM-DD") : format) ?? 'YYYY-MM-DD HH:mm:ss') : '' } /** -- Gitee From 93e928f94558326e445910fdd36f917a5046dbc5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=A2=E8=B6=8A?= <552369664@qq.com> Date: Wed, 21 Aug 2024 16:41:11 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=E3=80=90=E9=A1=B5=E9=9D=A2=E4=BC=98?= =?UTF-8?q?=E5=8C=96=E3=80=91=E4=BC=98=E5=8C=96=E5=95=86=E5=9F=8E=E5=AE=A2?= =?UTF-8?q?=E6=9C=8D=E9=A1=B5=E9=9D=A2=E7=9A=84=E5=A4=96=E8=A7=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../kefu/components/KeFuConversationList.vue | 22 +++++++++---------- .../kefu/components/KeFuMessageList.vue | 5 +++-- .../history/MemberBrowsingHistory.vue | 2 +- .../kefu/components/message/OrderItem.vue | 22 ++++++++++++++----- .../kefu/components/message/ProductItem.vue | 11 +++++----- .../promotion/kefu/components/tools/emoji.ts | 4 ++-- 6 files changed, 40 insertions(+), 26 deletions(-) diff --git a/src/views/mall/promotion/kefu/components/KeFuConversationList.vue b/src/views/mall/promotion/kefu/components/KeFuConversationList.vue index 60188f322..0a8ba1eab 100644 --- a/src/views/mall/promotion/kefu/components/KeFuConversationList.vue +++ b/src/views/mall/promotion/kefu/components/KeFuConversationList.vue @@ -22,17 +22,16 @@
{{ item.userNickname }} - + {{ formatPast(item.lastMessageTime, 'YYYY-mm-dd') }}
+ v-dompurify-html="getConversationDisplayText(item.lastMessageContentType, item.lastMessageContent)" + class="last-message flex items-center color-[var(--left-menu-text-color)]" + > +
@@ -182,7 +181,7 @@ watch(showRightMenu, (val) => { &-conversation { height: 60px; padding: 10px; - background-color: #fff; + //background-color: #fff; transition: border-left 0.05s ease-in-out; /* 设置过渡效果 */ .username { @@ -196,6 +195,7 @@ watch(showRightMenu, (val) => { } .last-message { + font-size: 13px; width: 200px; overflow: hidden; // 隐藏超出的文本 white-space: nowrap; // 禁止换行 @@ -205,16 +205,16 @@ watch(showRightMenu, (val) => { .active { border-left: 5px #3271ff solid; - background-color: #eff0f1; + background-color: var(--left-menu-bg-active-color); } .pinned { - background-color: #eff0f1; + background-color: var(--left-menu-bg-active-color); } .right-menu-ul { position: absolute; - background-color: #fff; + background-color: var(--app-content-bg-color); padding: 10px; margin: 0; list-style-type: none; /* 移除默认的项目符号 */ @@ -228,7 +228,7 @@ watch(showRightMenu, (val) => { border-radius: 12px; transition: background-color 0.3s; /* 平滑过渡 */ &:hover { - background-color: #e0e0e0; /* 悬停时的背景颜色 */ + background-color: var(--left-menu-bg-active-color); /* 悬停时的背景颜色 */ } } } diff --git a/src/views/mall/promotion/kefu/components/KeFuMessageList.vue b/src/views/mall/promotion/kefu/components/KeFuMessageList.vue index d3632e63a..410843031 100644 --- a/src/views/mall/promotion/kefu/components/KeFuMessageList.vue +++ b/src/views/mall/promotion/kefu/components/KeFuMessageList.vue @@ -369,9 +369,10 @@ const showTime = computed(() => (item: KeFuMessageRespVO, index: number) => { position: absolute; bottom: 35px; right: 35px; - background-color: #fff; + background-color: var(--app-content-bg-color); padding: 10px; border-radius: 30px; + font-size: 12px; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* 阴影效果 */ } @@ -445,7 +446,7 @@ const showTime = computed(() => (item: KeFuMessageRespVO, index: number) => { border-radius: 12rpx; padding: 8rpx 16rpx; margin-bottom: 16rpx; - background-color: #e8e8e8; + //background-color: #e8e8e8; color: #999; font-size: 24rpx; } diff --git a/src/views/mall/promotion/kefu/components/history/MemberBrowsingHistory.vue b/src/views/mall/promotion/kefu/components/history/MemberBrowsingHistory.vue index 8b6891aec..52c1095b5 100644 --- a/src/views/mall/promotion/kefu/components/history/MemberBrowsingHistory.vue +++ b/src/views/mall/promotion/kefu/components/history/MemberBrowsingHistory.vue @@ -7,7 +7,7 @@
- + diff --git a/src/views/mall/promotion/kefu/components/message/OrderItem.vue b/src/views/mall/promotion/kefu/components/message/OrderItem.vue index 5ee21f281..2258c81eb 100644 --- a/src/views/mall/promotion/kefu/components/message/OrderItem.vue +++ b/src/views/mall/promotion/kefu/components/message/OrderItem.vue @@ -1,7 +1,7 @@