From f0ba8ff0af4cbd2b9e76a029233f0c1967c10b95 Mon Sep 17 00:00:00 2001 From: puhui999 Date: Wed, 17 Jul 2024 16:43:20 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E6=96=B0=E5=A2=9E=E3=80=91=E5=AE=A2?= =?UTF-8?q?=E6=9C=8D=E4=BC=9A=E8=AF=9D=E6=89=80=E5=B1=9E=E4=BC=9A=E5=91=98?= =?UTF-8?q?=E8=B6=B3=E8=BF=B9=E5=B1=95=E7=A4=BA=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/mall/product/history.ts | 9 +++ .../kefu/components/KeFuConversationList.vue | 16 +++++- .../history/MemberBrowsingHistory.vue | 57 +++++++++++++++++++ .../history/ProductBrowsingHistory.vue | 38 +++++++++++++ .../mall/promotion/kefu/components/index.ts | 3 +- src/views/mall/promotion/kefu/index.vue | 14 ++++- 6 files changed, 130 insertions(+), 7 deletions(-) create mode 100644 src/api/mall/product/history.ts create mode 100644 src/views/mall/promotion/kefu/components/history/MemberBrowsingHistory.vue create mode 100644 src/views/mall/promotion/kefu/components/history/ProductBrowsingHistory.vue diff --git a/src/api/mall/product/history.ts b/src/api/mall/product/history.ts new file mode 100644 index 00000000..022a022b --- /dev/null +++ b/src/api/mall/product/history.ts @@ -0,0 +1,9 @@ +import request from '@/config/axios' + +/** + * 获得商品浏览记录分页 + * @param params 请求参数 + */ +export const getBrowseHistoryPage = (params: any) => { + return request.get({ url: '/product/browse-history/page', params }) +} diff --git a/src/views/mall/promotion/kefu/components/KeFuConversationList.vue b/src/views/mall/promotion/kefu/components/KeFuConversationList.vue index 2a651672..60188f32 100644 --- a/src/views/mall/promotion/kefu/components/KeFuConversationList.vue +++ b/src/views/mall/promotion/kefu/components/KeFuConversationList.vue @@ -21,9 +21,9 @@
- {{ item.userNickname }} + {{ item.userNickname }} - {{ formatDate(item.lastMessageTime) }} + {{ formatPast(item.lastMessageTime, 'YYYY-mm-dd') }}
@@ -70,7 +70,7 @@ + + diff --git a/src/views/mall/promotion/kefu/components/history/ProductBrowsingHistory.vue b/src/views/mall/promotion/kefu/components/history/ProductBrowsingHistory.vue new file mode 100644 index 00000000..3c2d0dd0 --- /dev/null +++ b/src/views/mall/promotion/kefu/components/history/ProductBrowsingHistory.vue @@ -0,0 +1,38 @@ + + + + + diff --git a/src/views/mall/promotion/kefu/components/index.ts b/src/views/mall/promotion/kefu/components/index.ts index 88e52832..585d0da7 100644 --- a/src/views/mall/promotion/kefu/components/index.ts +++ b/src/views/mall/promotion/kefu/components/index.ts @@ -1,4 +1,5 @@ import KeFuConversationList from './KeFuConversationList.vue' import KeFuMessageList from './KeFuMessageList.vue' +import MemberBrowsingHistory from './history/MemberBrowsingHistory.vue' -export { KeFuConversationList, KeFuMessageList } +export { KeFuConversationList, KeFuMessageList, MemberBrowsingHistory } diff --git a/src/views/mall/promotion/kefu/index.vue b/src/views/mall/promotion/kefu/index.vue index 06a6f02b..03deb895 100644 --- a/src/views/mall/promotion/kefu/index.vue +++ b/src/views/mall/promotion/kefu/index.vue @@ -1,22 +1,28 @@