From 48a07c64d53a93d002a7fdabb2a0df68e6733836 Mon Sep 17 00:00:00 2001 From: zoujing Date: Thu, 25 Sep 2025 18:24:48 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=A2=9E=E5=8A=A0=E5=AE=A2=E6=88=B7?= =?UTF-8?q?=E7=AB=AF=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/constant/base.js | 31 ++++++- .../components/chat/ChatMainList/index.vue | 1 + .../components/chat/ChatQuickAccess/index.vue | 81 +++++++++++++------ 3 files changed, 85 insertions(+), 28 deletions(-) diff --git a/src/constant/base.js b/src/constant/base.js index fb8a063..a79914f 100644 --- a/src/constant/base.js +++ b/src/constant/base.js @@ -3,6 +3,30 @@ import DHWQ from "@/pages/login/images/dhwq.png"; import TM from "@/pages/login/images/tm.png"; import WSMM from "@/pages/login/images/wsmm.png"; +/// 客户端类型 +export const ClientType = { + // 智念 + ZHINIAN: "ZHINIAN", + // 朵花 + DUOHUA: "DUOHUA", + // 天沐 + TIANMU: "TIANMU", +}; + +/// 获取当前客户端类型 +export const currentClientType = (name) => { + switch (name) { + case '智念': + return ClientType.ZHINIAN; + case '朵花': + return ClientType.DUOHUA; + case '天沐': + return ClientType.TIANMU; + default: + return ClientType.ZHINIAN; + } +}; + /** * 客户端配置管理模块 * @@ -39,9 +63,12 @@ const processConfigs = (configs) => { export const CLIENT_CONFIGS = processConfigs(rawConfigs); // 获取当前用户端配置 -export const getCurrentConfig = () => CLIENT_CONFIGS.tianmu; +export const getCurrentConfig = () => CLIENT_CONFIGS.duohua; export const clientId = getCurrentConfig().clientId; export const appId = getCurrentConfig().appId; // 环境配置 - 智念客户端使用测试环境,其他客户端使用生产环境 -export const isProd = getCurrentConfig().name !== '智念'; +export const isProd = currentClientType(getCurrentConfig().name) !== ClientType.ZHINIAN; + + + diff --git a/src/pages/index/components/chat/ChatMainList/index.vue b/src/pages/index/components/chat/ChatMainList/index.vue index c0a3637..2b56123 100644 --- a/src/pages/index/components/chat/ChatMainList/index.vue +++ b/src/pages/index/components/chat/ChatMainList/index.vue @@ -430,6 +430,7 @@ const getMainPageData = async () => { const res = await mainPageData({ sceneId }); if (res.code === 0) { + appStore.setSceneId(""); initData(); mainPageDataModel.value = res.data; agentId.value = res.data.agentId; diff --git a/src/pages/index/components/chat/ChatQuickAccess/index.vue b/src/pages/index/components/chat/ChatQuickAccess/index.vue index 547b033..3718f0a 100644 --- a/src/pages/index/components/chat/ChatQuickAccess/index.vue +++ b/src/pages/index/components/chat/ChatQuickAccess/index.vue @@ -24,6 +24,7 @@