支持客服入口按业务场景分流到客服分组

联系客服支持 scene(general/mohong),按用户与场景复用会话;摸大红入口走摸大红分组选人。
This commit is contained in:
yml2213
2026-07-16 20:05:10 +08:00
parent e07532a188
commit 66ca2693b3
17 changed files with 224 additions and 21 deletions
+3 -2
View File
@@ -24,7 +24,7 @@ import {
VideoPlay,
Wallet,
} from '@element-plus/icons-vue'
import { ensureSupportChat } from '@/features/chats/api/chats'
import { ensureSupportChat, resolveSupportScene } from '@/features/chats/api/chats'
import { useChatUnreadCount } from '@/features/chats/composables/useChatUnreadCount'
import { useSessionStore } from '@/stores/session'
@@ -111,7 +111,8 @@ async function handleSupportClick() {
if (supportLoading.value) return
supportLoading.value = true
try {
const chat = await ensureSupportChat()
const scene = resolveSupportScene(route.path)
const chat = await ensureSupportChat(scene)
router.push(`/messages/${chat.id}`)
} catch {
ElMessage.error('联系客服失败,请稍后重试')