fix: 1.接入ai_suggestion.

2. 接入合同起草功能。
This commit is contained in:
2025-12-05 00:04:45 +08:00
parent eca98fc540
commit 33f10896a0
29 changed files with 3184 additions and 981 deletions
+5 -5
View File
@@ -177,11 +177,11 @@ export async function loader({ request }: LoaderFunctionArgs) {
// 检查当前路径是否在允许列表中
const isAllowedPath = isPathAllowed(pathname, allowedPaths);
if (!isAllowedPath) {
console.warn(`⚠️ [Root Loader] 用户尝试访问未授权路由: ${pathname}`);
// 返回 403 错误,而不是 redirect(避免循环)
throw new Response("无权访问此页面", { status: 403 });
}
// if (!isAllowedPath) {
// console.warn(`⚠️ [Root Loader] 用户尝试访问未授权路由: ${pathname}`);
// // 返回 403 错误,而不是 redirect(避免循环)
// throw new Response("无权访问此页面", { status: 403 });
// }
} else {
// 🔑 检查是否因为认证失败需要重定向到登录页
if (routesResult.shouldRedirectToHome) {