From 05f6055a846657ff88ef1c3ec9b659bea3a7e03d Mon Sep 17 00:00:00 2001
From: Senor-Liu <71912659+Senor-Liu@users.noreply.github.com>
Date: Fri, 21 Aug 2026 09:19:31 +0800
Subject: [PATCH] =?UTF-8?q?merge:=20=E5=90=88=E5=B9=B6=E6=9C=80=E6=96=B0?=
=?UTF-8?q?=E4=BB=A3=E7=A0=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
web/client/src/app.jsx | 9 +--
web/client/src/layout/components/header.jsx | 2 +-
web/client/src/layout/index.jsx | 2 +-
web/client/src/sections/aichat/router.js | 2 +-
.../articleSelect/actions/request.jsx | 2 +-
.../articleSelect/container/index.jsx | 2 +-
.../components/FinanceInvoiceWorkspace.jsx | 2 +-
web/client/src/sections/newAiChat/router.js | 2 +-
.../sections/pepAuth/container/pepAuth.jsx | 14 ++--
.../schemeList/container/schemeList.jsx | 2 +-
.../sections/superAgent/container/index.jsx | 70 +++++++++++--------
.../superAgent/hooks/useSuperAgentChat.js | 6 ++
.../superAgent/hooks/useSuperAgentStream.js | 25 +++----
web/client/src/sections/superAgent/router.js | 2 +-
.../src/sections/tender/container/tender.jsx | 2 +-
web/client/src/utils/index.js | 6 +-
16 files changed, 77 insertions(+), 73 deletions(-)
diff --git a/web/client/src/app.jsx b/web/client/src/app.jsx
index 890a96c..a7d60b8 100644
--- a/web/client/src/app.jsx
+++ b/web/client/src/app.jsx
@@ -207,17 +207,12 @@ const App = () => {
const initAuth = async () => {
const { search, pathname } = window.location;
const urlParams = new URLSearchParams(search);
- const clientId = urlParams.get("clientid") || "pep-feixiaoshang";
const authRoutes = ["/tender", "/schemeList", "/automatedReports"];
- if (
- authRoutes.includes(pathname) ||
- (pathname === "/aichat" && clientId === "pep-feixiaoshang")
- ) {
+ if (authRoutes.includes(pathname)) {
if (import.meta.env.DEV) return; // 开发环境跳过认证
if (urlParams.get("dev") === "true") return; // url参数dev为true时跳过认证
- const query = search ? `${search}&redirect=${encodeURIComponent(pathname)}` : `?redirect=${encodeURIComponent(pathname)}`;
- window.location.replace(`/pepAuth${query}`);
+ window.location.replace("/chat");
}
};
diff --git a/web/client/src/layout/components/header.jsx b/web/client/src/layout/components/header.jsx
index 4385c1a..7d6b3a5 100644
--- a/web/client/src/layout/components/header.jsx
+++ b/web/client/src/layout/components/header.jsx
@@ -30,7 +30,7 @@ export default function header () {
items: [{
label:
{
clearCompatibleAuthInfo();
- navigate("/aichat");
+ navigate("/chat");
}}>
退出登录
,
diff --git a/web/client/src/layout/index.jsx b/web/client/src/layout/index.jsx
index 9717eeb..76fdd95 100644
--- a/web/client/src/layout/index.jsx
+++ b/web/client/src/layout/index.jsx
@@ -95,7 +95,7 @@ export default function index(props) {
{outerRoutes}
}>
- } />
+ } />
{innerRoutes}
diff --git a/web/client/src/sections/aichat/router.js b/web/client/src/sections/aichat/router.js
index 20a461b..5e79e6f 100644
--- a/web/client/src/sections/aichat/router.js
+++ b/web/client/src/sections/aichat/router.js
@@ -4,7 +4,7 @@ export default {
type: 'outer',
route: {
key: 'aichat',
- path: "/aichatv1",
+ path: "/chatv1",
component: AiChat
}
};
diff --git a/web/client/src/sections/articleSelect/actions/request.jsx b/web/client/src/sections/articleSelect/actions/request.jsx
index a2adc6a..4b9fda3 100644
--- a/web/client/src/sections/articleSelect/actions/request.jsx
+++ b/web/client/src/sections/articleSelect/actions/request.jsx
@@ -11,7 +11,7 @@ export const apiRequest = new request({
if (err) {
if (err?.status === 401) {
clearCompatibleAuthInfo()
- window.location.replace('/aichat');
+ window.location.replace('/chat');
}
return err
}
diff --git a/web/client/src/sections/articleSelect/container/index.jsx b/web/client/src/sections/articleSelect/container/index.jsx
index cac2dd4..4d73f80 100644
--- a/web/client/src/sections/articleSelect/container/index.jsx
+++ b/web/client/src/sections/articleSelect/container/index.jsx
@@ -15,7 +15,7 @@ export default function MatchContainer() {
interceptor: (res, err) => { // 拦截器,用于处理请求结果,两参数互斥出现
if (err) {
if (err?.status === 401) {
- window.location.replace('/aichat');
+ window.location.replace('/chat');
sessionStorage.clear()
}
return err
diff --git a/web/client/src/sections/financeInvoice/components/FinanceInvoiceWorkspace.jsx b/web/client/src/sections/financeInvoice/components/FinanceInvoiceWorkspace.jsx
index e58882b..9d4f864 100644
--- a/web/client/src/sections/financeInvoice/components/FinanceInvoiceWorkspace.jsx
+++ b/web/client/src/sections/financeInvoice/components/FinanceInvoiceWorkspace.jsx
@@ -87,7 +87,7 @@ const formatQueryHistoryTitle = (item) => {
const handleFinanceInvoiceAuthExpired = () => {
clearCompatibleAuthInfo();
- window.location.replace("/aichat");
+ window.location.replace("/chat");
};
/**
diff --git a/web/client/src/sections/newAiChat/router.js b/web/client/src/sections/newAiChat/router.js
index 667d5a0..17382fc 100644
--- a/web/client/src/sections/newAiChat/router.js
+++ b/web/client/src/sections/newAiChat/router.js
@@ -4,7 +4,7 @@ export default {
type: "outer",
route: {
key: "chat",
- path: "/chat",
+ path: "/chatv2",
component: NewAiChat,
nav: false,
},
diff --git a/web/client/src/sections/pepAuth/container/pepAuth.jsx b/web/client/src/sections/pepAuth/container/pepAuth.jsx
index 59479ea..ef0da45 100644
--- a/web/client/src/sections/pepAuth/container/pepAuth.jsx
+++ b/web/client/src/sections/pepAuth/container/pepAuth.jsx
@@ -15,9 +15,9 @@ export default function PepAuth() {
const urlParams = new URLSearchParams(search);
const token = urlParams.get('token');
if (!token) {
- message.warning('请登录项企后跳转飞小尚');
+ message.warning('登录状态无效,请返回聊天页面');
setTimeout(() => {
- window.location.href = 'https://pep.anxinyun.cn'
+ window.location.replace('/chat');
}, 2000);
return;
}
@@ -27,18 +27,18 @@ export default function PepAuth() {
const pepUserId = userRes.payload.data?.pepUserId || userRes.payload.data?.pepId || userRes.payload.data?.id;
localStorage.setItem('userId', String(pepUserId || ''));
localStorage.setItem('userInfo', JSON.stringify(userRes.payload.data));
- window.location.replace(urlParams.get('redirect') || '/aichat');
+ window.location.replace(urlParams.get('redirect') || '/chat');
} else {
- message.warning('鉴权失败!请重新登录项企后跳转飞小尚');
+ message.warning('鉴权失败,请返回聊天页面');
setTimeout(() => {
- window.location.href = 'https://pep.anxinyun.cn';
+ window.location.replace('/chat');
}, 2000);
}
} catch (error) {
console.error(error);
- message.warning('鉴权失败!请重新登录项企后跳转飞小尚');
+ message.warning('鉴权失败,请返回聊天页面');
setTimeout(() => {
- window.location.href = 'https://pep.anxinyun.cn';
+ window.location.replace('/chat');
}, 2000);
}
}
diff --git a/web/client/src/sections/schemeList/container/schemeList.jsx b/web/client/src/sections/schemeList/container/schemeList.jsx
index ae02a36..aa09cfe 100644
--- a/web/client/src/sections/schemeList/container/schemeList.jsx
+++ b/web/client/src/sections/schemeList/container/schemeList.jsx
@@ -120,7 +120,7 @@ export default function SchemeList() {