From a75bb909f1925a49045fdb9962114f20cda66628 Mon Sep 17 00:00:00 2001 From: DEV_DSW <562304744@qq.com> Date: Wed, 27 May 2026 10:40:21 +0800 Subject: [PATCH] chore: dev proxy config, sprite animator refactor, cleanups - add vite dev proxy for `/ingress` to forward requests to backend https://onefeel.brother7.cn - update .env.development to use relative proxy paths instead of full backend URLs - move SpriteAnimator component to correct directory, update all imports and global type declarations in components.d.ts - remove unused CSS styles and fix styling for ChatTopNavBar component, including switching to van-icon and hardcoding temporary site name - uncomment and enable the ChatMainList component in home page - clean up unused code, fix formatting, and set default client ID in src/utils/request.ts - comment out redundant uni API calls in ChatMainList to simplify code - update WebSocket URL handling to support relative paths in ChatMainList --- .env.development | 4 +- components.d.ts | 4 +- .../index.vue} | 0 .../home/components/ChatMainList/index.vue | 286 +++++------------- .../home/components/ChatTopNavBar/index.vue | 28 +- .../ChatTopNavBar/styles/index.scss | 10 +- .../home/components/ChatTopWelcome/index.vue | 2 +- .../home/components/HomeWelcome/index.vue | 2 +- src/pages/home/index.vue | 4 +- src/utils/request.ts | 11 +- vite.config.ts | 8 + 11 files changed, 109 insertions(+), 250 deletions(-) rename src/components/{Sprite/SpriteAnimator.vue => SpriteAnimator/index.vue} (100%) diff --git a/.env.development b/.env.development index 3481496..aaf97dc 100644 --- a/.env.development +++ b/.env.development @@ -2,10 +2,10 @@ VITE_APP_ENV = 'development' # API 基础 URL -VITE_API_BASE_URL = 'https://onefeel.brother7.cn/ingress' +VITE_API_BASE_URL = '/ingress' # API 请求超时时间(毫秒) VITE_API_TIMEOUT_MS = 10000 # Socket 基础 URL -VITE_SOCKET_BASE_URL = "wss://onefeel.brother7.cn/ingress/agent/ws/chat" \ No newline at end of file +VITE_SOCKET_BASE_URL = "/ingress/agent/ws/chat" diff --git a/components.d.ts b/components.d.ts index 3504323..ed43cf8 100644 --- a/components.d.ts +++ b/components.d.ts @@ -39,7 +39,7 @@ declare module 'vue' { RouterLink: typeof import('vue-router')['RouterLink'] RouterView: typeof import('vue-router')['RouterView'] ServiceTipsWord: typeof import('./src/components/ServiceTipsWord/index.vue')['default'] - SpriteAnimator: typeof import('./src/components/Sprite/SpriteAnimator.vue')['default'] + SpriteAnimator: typeof import('./src/components/SpriteAnimator/index.vue')['default'] Stepper: typeof import('./src/components/Stepper/index.vue')['default'] SumCard: typeof import('./src/components/SumCard/index.vue')['default'] SurveyQuestionnaire: typeof import('./src/components/SurveyQuestionnaire/index.vue')['default'] @@ -83,7 +83,7 @@ declare global { const RouterLink: typeof import('vue-router')['RouterLink'] const RouterView: typeof import('vue-router')['RouterView'] const ServiceTipsWord: typeof import('./src/components/ServiceTipsWord/index.vue')['default'] - const SpriteAnimator: typeof import('./src/components/Sprite/SpriteAnimator.vue')['default'] + const SpriteAnimator: typeof import('./src/components/SpriteAnimator/index.vue')['default'] const Stepper: typeof import('./src/components/Stepper/index.vue')['default'] const SumCard: typeof import('./src/components/SumCard/index.vue')['default'] const SurveyQuestionnaire: typeof import('./src/components/SurveyQuestionnaire/index.vue')['default'] diff --git a/src/components/Sprite/SpriteAnimator.vue b/src/components/SpriteAnimator/index.vue similarity index 100% rename from src/components/Sprite/SpriteAnimator.vue rename to src/components/SpriteAnimator/index.vue diff --git a/src/pages/home/components/ChatMainList/index.vue b/src/pages/home/components/ChatMainList/index.vue index a466ea2..038d56e 100644 --- a/src/pages/home/components/ChatMainList/index.vue +++ b/src/pages/home/components/ChatMainList/index.vue @@ -1,153 +1,14 @@