From 6fecdf6878545238079000df9fe0a5c6634abd2a Mon Sep 17 00:00:00 2001
From: sonjinyon <2476687577@qq.com>
Date: Wed, 6 Nov 2024 17:44:13 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=AE=A2=E6=9C=8D=E5=8A=9F?=
=?UTF-8?q?=E8=83=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
yudao-admin-vue3/src/api/member/user/index.ts | 6 +
yudao-admin-vue3/src/layout/Layout.vue | 2 +-
.../src/layout/components/useRenderLayout.tsx | 194 ++++++++++--------
.../kefu/components/KeFuMessageList.vue | 42 +++-
.../promotion/kefu/components/UserInfo.vue | 62 ++++++
.../mall/promotion/kefu/components/index.ts | 3 +-
.../components/tools/EmojiSelectPopover.vue | 5 +-
.../components/tools/PictureSelectUpload.vue | 4 +-
.../src/views/mall/promotion/kefu/index.vue | 102 +++++++--
.../mall/promotion/supportstaff/index.vue | 68 ++----
.../kefu/KeFuConversationController.java | 6 +-
.../mysql/kefu/KeFuConversationMapper.java | 4 +-
.../service/kefu/KeFuConversationService.java | 2 +-
.../kefu/KeFuConversationServiceImpl.java | 9 +-
.../admin/user/MemberUserController.java | 31 +++
.../dal/dataobject/user/MemberUserDO.java | 6 +
16 files changed, 377 insertions(+), 169 deletions(-)
create mode 100644 yudao-admin-vue3/src/views/mall/promotion/kefu/components/UserInfo.vue
diff --git a/yudao-admin-vue3/src/api/member/user/index.ts b/yudao-admin-vue3/src/api/member/user/index.ts
index e38206a..b8b5304 100644
--- a/yudao-admin-vue3/src/api/member/user/index.ts
+++ b/yudao-admin-vue3/src/api/member/user/index.ts
@@ -20,6 +20,7 @@ export interface UserVO {
point: number | undefined | null
totalPoint: number | undefined | null
experience: number | null | undefined
+ groupName: string
}
// 查询会员用户列表
@@ -51,3 +52,8 @@ export const updateUserPoint = async (data: any) => {
export const updateUserBalance = async (data: any) => {
return await request.put({ url: `/member/user/update-balance`, data })
}
+
+// 客服查询用户详情
+export const getUserInfo = async (id: number) => {
+ return await request.get({ url: `/member/user/getUserInfo?id=` + id })
+}
diff --git a/yudao-admin-vue3/src/layout/Layout.vue b/yudao-admin-vue3/src/layout/Layout.vue
index af51970..13a82e7 100644
--- a/yudao-admin-vue3/src/layout/Layout.vue
+++ b/yudao-admin-vue3/src/layout/Layout.vue
@@ -54,7 +54,7 @@ export default defineComponent({
onClick={handleClickOutside}
>
) : undefined}
-
+
{renderLayout()}
diff --git a/yudao-admin-vue3/src/layout/components/useRenderLayout.tsx b/yudao-admin-vue3/src/layout/components/useRenderLayout.tsx
index 1110cd8..11184f2 100644
--- a/yudao-admin-vue3/src/layout/components/useRenderLayout.tsx
+++ b/yudao-admin-vue3/src/layout/components/useRenderLayout.tsx
@@ -35,88 +35,120 @@ const mobile = computed(() => appStore.getMobile)
// 固定菜单
const fixedMenu = computed(() => appStore.getFixedMenu)
+import { useRoute } from 'vue-router'
+
export const useRenderLayout = () => {
- const renderClassic = () => {
- return (
- <>
-
- {logo.value ? (
-
- ) : undefined}
-
-
-
-
-
-
-
- {tagsView.value ? (
-
- ) : undefined}
-
-
-
-
-
- >
- )
- }
+ const route = useRoute()
+ let renderClassic = null;
+ if(route.path == "/kefu/kefu"){
+ renderClassic = () => {
+ return (
+ <>
+
+
+ >
+ )
+ }
+ }else {
+ renderClassic = () => {
+ return (
+ <>
+
+ {logo.value ? (
+
+ ) : undefined}
+
+
+
+
+
+
+
+ {tagsView.value ? (
+
+ ) : undefined}
+
+
+
+
+
+ >
+ )
+ }
+ }
const renderTopLeft = () => {
return (
diff --git a/yudao-admin-vue3/src/views/mall/promotion/kefu/components/KeFuMessageList.vue b/yudao-admin-vue3/src/views/mall/promotion/kefu/components/KeFuMessageList.vue
index 399f02e..accb631 100644
--- a/yudao-admin-vue3/src/views/mall/promotion/kefu/components/KeFuMessageList.vue
+++ b/yudao-admin-vue3/src/views/mall/promotion/kefu/components/KeFuMessageList.vue
@@ -1,11 +1,14 @@
-
+
-
+
+
+
+
@@ -20,6 +23,8 @@
{{ item.content }}
+
+
+
+
+
+
-
-
+
+
-
+
([]) // 在线客服列表的数据
+ const messages = useMessage() // 消息弹窗
+ const kefuName = ref('')
const queryParams = reactive({
pageNo: 1,
@@ -250,6 +262,7 @@
/** 获得新会话的消息列表 */
// TODO @puhui999:可优化:可以考虑本地做每个会话的消息 list 缓存;然后点击切换时,读取缓存;然后异步获取新消息,merge 下;
const getNewMessageList = async (val : KeFuConversationRespVO) => {
+ // console.log('22222222',val)
// 会话切换,重置相关参数
queryParams.pageNo = 1
messageList.value = []
@@ -309,7 +322,6 @@
dialogVisible.value = false;
}
const clickMenu = (id : string) => {
- console.log('1111111111', id)
getVerbalTrickList(id)
}
@@ -417,6 +429,7 @@
status: 1,
})
onlineStaffList.value = data.list
+
} finally {
}
}
@@ -424,7 +437,16 @@
/** 转接客服人员列表 id:会话id kefuId:客服人员id */
const transferConversion = async (kefuId : number) => {
try {
- await KeFuConversationApi.transferConversion(queryParams.conversationId, kefuId)
+ const re = await KeFuConversationApi.transferConversion(queryParams.conversationId, kefuId)
+ kefuName.value = re
+ // 2. 组织发送消息
+ const msg = {
+ conversationId: conversation.value.id,
+ contentType: KeFuMessageContentTypeEnum.SYSTEM,
+ content: '已为您转接至' + re,
+ }
+ await sendMessage(msg)
+ messages.success('转接成功')
} finally {
// todo 刷新会话列表
}
diff --git a/yudao-admin-vue3/src/views/mall/promotion/kefu/components/UserInfo.vue b/yudao-admin-vue3/src/views/mall/promotion/kefu/components/UserInfo.vue
new file mode 100644
index 0000000..160241b
--- /dev/null
+++ b/yudao-admin-vue3/src/views/mall/promotion/kefu/components/UserInfo.vue
@@ -0,0 +1,62 @@
+
+
+
+
+
+ Marvin
+
+
+
+
+
+ 手机号暂无
+
+
+ 分组D类客户
+
+
+ 用户标签小客户
+
+
+
+
+ 用户等级暂无
+
+
+ 推荐人客户
+
+
+ 用户类型小客户
+
+
+ 余额暂无
+
+
+ 推广员客户
+
+
+ 生日小客户
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/yudao-admin-vue3/src/views/mall/promotion/kefu/components/index.ts b/yudao-admin-vue3/src/views/mall/promotion/kefu/components/index.ts
index 585d0da..d70abfb 100644
--- a/yudao-admin-vue3/src/views/mall/promotion/kefu/components/index.ts
+++ b/yudao-admin-vue3/src/views/mall/promotion/kefu/components/index.ts
@@ -1,5 +1,6 @@
import KeFuConversationList from './KeFuConversationList.vue'
import KeFuMessageList from './KeFuMessageList.vue'
import MemberBrowsingHistory from './history/MemberBrowsingHistory.vue'
+import UserInfo from './UserInfo.vue'
-export { KeFuConversationList, KeFuMessageList, MemberBrowsingHistory }
+export { KeFuConversationList, KeFuMessageList, MemberBrowsingHistory ,UserInfo}
diff --git a/yudao-admin-vue3/src/views/mall/promotion/kefu/components/tools/EmojiSelectPopover.vue b/yudao-admin-vue3/src/views/mall/promotion/kefu/components/tools/EmojiSelectPopover.vue
index 43c096d..bb2c27e 100644
--- a/yudao-admin-vue3/src/views/mall/promotion/kefu/components/tools/EmojiSelectPopover.vue
+++ b/yudao-admin-vue3/src/views/mall/promotion/kefu/components/tools/EmojiSelectPopover.vue
@@ -2,7 +2,8 @@
-
+
+