From b906058cdc90ab9ee719b5a1552f1184bda32deb Mon Sep 17 00:00:00 2001 From: DEV_DSW <562304744@qq.com> Date: Mon, 1 Jun 2026 11:44:56 +0800 Subject: [PATCH] feat: add service order component - add CreateServiceOrder component and associated icon assets - create reusable resolveChatSocketUrl utility with comprehensive test cases - update development env config to use production websocket endpoint - fix ChatCardAi layout by replacing inline-block with flex-1 class - refactor ChatMainList websocket initialization to use the new socket utility - switch to using environment variable for access token instead of getAccessToken - correct relative import path for CreateServiceOrder in ChatMainList --- .env.development | 2 +- .../home/components/ChatCardAi/index.vue | 2 +- .../home/components/ChatMainList/index.vue | 18 ++----- .../images/icon_service.png | Bin .../CreateServiceOrder/images/icon_volume.png | Bin .../components/CreateServiceOrder/index.vue | 9 ++-- src/utils/socketUrl.test.ts | 41 +++++++++++++++ src/utils/socketUrl.ts | 47 ++++++++++++++++++ 8 files changed, 99 insertions(+), 20 deletions(-) rename src/{ => pages/home}/components/CreateServiceOrder/images/icon_service.png (100%) rename src/{ => pages/home}/components/CreateServiceOrder/images/icon_volume.png (100%) rename src/{ => pages/home}/components/CreateServiceOrder/index.vue (96%) create mode 100644 src/utils/socketUrl.test.ts create mode 100644 src/utils/socketUrl.ts diff --git a/.env.development b/.env.development index 7182bcf..e7e10af 100644 --- a/.env.development +++ b/.env.development @@ -8,7 +8,7 @@ VITE_API_BASE_URL = '/ingress' VITE_API_TIMEOUT_MS = 10000 # Socket 基础 URL -VITE_SOCKET_BASE_URL = "/ingress/agent/ws/chat" +VITE_SOCKET_BASE_URL = "wss://onefeel.brother7.cn/ingress/agent/ws/chat" # Client ID VITE_CLIENT_ID = "6" diff --git a/src/pages/home/components/ChatCardAi/index.vue b/src/pages/home/components/ChatCardAi/index.vue index bd612c1..531908b 100644 --- a/src/pages/home/components/ChatCardAi/index.vue +++ b/src/pages/home/components/ChatCardAi/index.vue @@ -1,7 +1,7 @@