From 59aad797797d221756a38439ffc5f71da5c3fbf6 Mon Sep 17 00:00:00 2001 From: zoujing Date: Mon, 8 Sep 2025 22:33:41 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=9B=B4=E6=8D=A2=E5=9F=9F=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development | 4 ++-- .env.production | 4 ++-- .env.staging | 4 ++-- constant/base.js | 6 ++++-- pages/chat/ChatMainList.vue | 2 +- pages/login/index.vue | 4 ++-- request/base/request.js | 5 +---- 7 files changed, 14 insertions(+), 15 deletions(-) diff --git a/.env.development b/.env.development index fcd005f..c4bc4b9 100644 --- a/.env.development +++ b/.env.development @@ -1,5 +1,5 @@ NODE_ENV = development -VITE_BASE_URL = https://onefeel.brother7.cn/ingress +VITE_BASE_URL = https://biz.nianxx.cn -VITE_WSS_URL = wss://onefeel.brother7.cn/ingress/agent/ws/chat +VITE_WSS_URL = wss://biz.nianxx.cn/agent/ws/chat diff --git a/.env.production b/.env.production index 864bbbb..cefae64 100644 --- a/.env.production +++ b/.env.production @@ -1,5 +1,5 @@ NODE_ENV = production -VITE_BASE_URL = https://onefeel.brother7.cn/ingress +VITE_BASE_URL = https://biz.nianxx.cn -VITE_WSS_URL = wss://onefeel.brother7.cn/ingress/agent/ws/chat \ No newline at end of file +VITE_WSS_URL = wss://biz.nianxx.cn/agent/ws/chat \ No newline at end of file diff --git a/.env.staging b/.env.staging index b04f720..8d7641c 100644 --- a/.env.staging +++ b/.env.staging @@ -1,5 +1,5 @@ NODE_ENV = staging -VITE_BASE_URL = https://onefeel.brother7.cn/ingress +VITE_BASE_URL = https://biz.nianxx.cn -VITE_WSS_URL = wss://onefeel.brother7.cn/ingress/agent/ws/chat \ No newline at end of file +VITE_WSS_URL = wss://biz.nianxx.cn/agent/ws/chat \ No newline at end of file diff --git a/constant/base.js b/constant/base.js index 9fe9d17..a6b185a 100644 --- a/constant/base.js +++ b/constant/base.js @@ -1,6 +1,8 @@ const isProd = true; -export const BASE_URL = "https://onefeel.brother7.cn/ingress"; //'http://8.138.234.141/ingress' +console.log(import.meta.env); + +export const BASE_URL = import.meta.env.VITE_BASE_URL; // socket地址 -export const WSS_URL = "wss://onefeel.brother7.cn/ingress/agent/ws/chat"; +export const WSS_URL = import.meta.env.VITE_WSS_URL; diff --git a/pages/chat/ChatMainList.vue b/pages/chat/ChatMainList.vue index 1d149d3..f77f1fa 100644 --- a/pages/chat/ChatMainList.vue +++ b/pages/chat/ChatMainList.vue @@ -297,7 +297,6 @@ const sendMessageAction = (inputText) => { if (!inputText.trim()) return; handleNoHideKeyboard(); - currentSessionMessageId = IdUtils.generateMessageId(); // 重置消息状态,准备接收新的AI回复 resetMessageState(); @@ -636,6 +635,7 @@ const sendChat = (message, isInstruct = false) => { const messageType = isInstruct ? 1 : 0; const messageContent = isInstruct ? commonType : message; + currentSessionMessageId = IdUtils.generateMessageId(); // 重置消息状态,为新消息做准备 resetMessageState(); diff --git a/pages/login/index.vue b/pages/login/index.vue index 84b0916..7d5a379 100644 --- a/pages/login/index.vue +++ b/pages/login/index.vue @@ -96,7 +96,7 @@ const handleAgreeAndGetPhone = () => { const onLogin = (e) => { const { code } = e.detail; - console.error("onLogin code", code); + console.info("onLogin code: ", code); loginAuth() .then(async () => { @@ -155,4 +155,4 @@ getPrivacyAgreementData(); \ No newline at end of file + diff --git a/request/base/request.js b/request/base/request.js index 2281370..ad8d1b0 100644 --- a/request/base/request.js +++ b/request/base/request.js @@ -1,4 +1,4 @@ -// import { BASE_URL } from "../../constant/base"; +import { BASE_URL } from "../../constant/base"; import { goLogin } from "@/hooks/useGoLogin"; const defaultConfig = { @@ -8,9 +8,6 @@ const defaultConfig = { }, }; -const BASE_URL = import.meta.env.VITE_BASE_URL; -console.log(import.meta.env); - function request(url, args = {}, method = "POST", customConfig = {}) { // 判断 url 是否以 http 开头 if (!/^http/.test(url)) {