From f61f0fa2e859f336c06c69d48f84d86c0c19cc5f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=8D=A2=E8=B6=8A?= <552369664@qq.com>
Date: Thu, 22 Aug 2024 09:47:17 +0800
Subject: [PATCH] =?UTF-8?q?=E3=80=90=E9=A1=B5=E9=9D=A2=E4=BC=98=E5=8C=96?=
=?UTF-8?q?=E3=80=91=E4=BC=98=E5=8C=96=E5=95=86=E5=9F=8E=E7=9B=B8=E5=85=B3?=
=?UTF-8?q?=E9=A1=B5=E9=9D=A2=E7=9A=84=E9=BB=91=E6=9A=97=E6=A8=A1=E5=BC=8F?=
=?UTF-8?q?=E9=80=82=E9=85=8D=E9=97=AE=E9=A2=98=EF=BC=8C=E4=B8=B4=E6=97=B6?=
=?UTF-8?q?=E4=BC=98=E5=8C=96=E5=AE=A2=E6=9C=8D=E7=9A=84=E9=A1=B5=E9=9D=A2?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/utils/formatTime.ts | 4 ++--
.../kefu/components/KeFuConversationList.vue | 24 +++++++++----------
.../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 ++--
.../order/components/OrderTableColumn.vue | 2 +-
src/views/mall/trade/order/detail/index.vue | 5 ++--
9 files changed, 47 insertions(+), 32 deletions(-)
diff --git a/src/utils/formatTime.ts b/src/utils/formatTime.ts
index 134a986e..ded65fe6 100644
--- a/src/utils/formatTime.ts
+++ b/src/utils/formatTime.ts
@@ -66,10 +66,10 @@ export const defaultShortcuts = [
export function formatDate(date: Date, format?: string): string {
// 日期不存在,则返回空
if (!date) {
- return ''
+ return '';
}
// 日期存在,则进行格式化
- return date ? dayjs(date).format(format ?? 'YYYY-MM-DD HH:mm:ss') : ''
+ return date ? dayjs(date).format(format ?? 'YYYY-MM-DD HH:mm:ss') : '';
}
/**
diff --git a/src/views/mall/promotion/kefu/components/KeFuConversationList.vue b/src/views/mall/promotion/kefu/components/KeFuConversationList.vue
index 60188f32..0ff3d422 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 d3632e63..41084303 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 8b6891ae..52c1095b 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 5ee21f28..2258c81e 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 @@