From 9d0890b54163b3e0f7bce476c3d518c94dc6bab0 Mon Sep 17 00:00:00 2001 From: DEV_DSW <562304744@qq.com> Date: Thu, 28 May 2026 10:18:04 +0800 Subject: [PATCH] refactor: update env configs, replace uni-ui and fix issues - add VITE_CLIENT_ID environment variable to all .env files, adjust API and socket URLs across dev/staging/prod environments - update request utility to use env var for client ID instead of hardcoded "6" - refactor GoodDetail component: replace uni-icons with van-icon, switch markdown renderer to vue3-markdown-it - refactor Calendar component: swap uni-popup for van-popup, remove deprecated SCSS styles, update markup and toast calls - fix ImageSwiper: rename handler methods, update preview navigation to use vue router, remove redundant code - correct margin class syntax in goods index page --- .env.development | 3 + .env.production | 5 +- .env.staging | 7 +- src/components/Calender/index.vue | 62 ++++++-------- src/components/Calender/styles/index.scss | 99 +---------------------- src/components/GoodDetail/index.vue | 9 ++- src/components/ImageSwiper/index.vue | 15 ++-- src/pages/goods/index.vue | 2 +- src/utils/request.ts | 2 +- vite.config.ts | 2 +- 10 files changed, 54 insertions(+), 152 deletions(-) diff --git a/.env.development b/.env.development index aaf97dc..f17b54c 100644 --- a/.env.development +++ b/.env.development @@ -9,3 +9,6 @@ VITE_API_TIMEOUT_MS = 10000 # Socket 基础 URL VITE_SOCKET_BASE_URL = "/ingress/agent/ws/chat" + +# Client ID +VITE_CLIENT_ID = "12" \ No newline at end of file diff --git a/.env.production b/.env.production index f7bf5c8..4bb5b24 100644 --- a/.env.production +++ b/.env.production @@ -8,4 +8,7 @@ VITE_API_BASE_URL = 'https://biz.nianxx.cn' VITE_API_TIMEOUT_MS = 10000 # Socket 基础 URL -VITE_SOCKET_BASE_URL = "wss://biz.nianxx.cn/ingress/agent/ws/chat" \ No newline at end of file +VITE_SOCKET_BASE_URL = "wss://biz.nianxx.cn/ingress/agent/ws/chat" + +# Client ID +VITE_CLIENT_ID = "12" \ No newline at end of file diff --git a/.env.staging b/.env.staging index ca02cc6..fdc5888 100644 --- a/.env.staging +++ b/.env.staging @@ -2,10 +2,13 @@ VITE_APP_ENV = 'staging' # API 基础 URL -VITE_API_BASE_URL = 'https://onefeel.brother7.cn/ingress' +VITE_API_BASE_URL = 'https://abroadbiz.nianxx.com/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 = "wss://abroadbiz.nianxx.com/ingress/agent/ws/chat" + +# Client ID +VITE_CLIENT_ID = "12" \ No newline at end of file diff --git a/src/components/Calender/index.vue b/src/components/Calender/index.vue index 32d9da8..544c855 100644 --- a/src/components/Calender/index.vue +++ b/src/components/Calender/index.vue @@ -1,21 +1,22 @@