diff --git a/app/components/layout/Sidebar.tsx b/app/components/layout/Sidebar.tsx index 85f1fea..0a7dbfc 100644 --- a/app/components/layout/Sidebar.tsx +++ b/app/components/layout/Sidebar.tsx @@ -214,14 +214,14 @@ export function Sidebar({ onToggle, collapsed, userRole, frontendJWT = '', selec // const visibleMenuIds = APP_MENU_MAP[currentApp as keyof typeof APP_MENU_MAP] // console.log('当前应用模式:', currentApp, '可见菜单ID:', visibleMenuIds); - // 检查是否通过51708端口访问 + // 检查是否通过51707端口访问(省局) // const isPort51708 = typeof window !== 'undefined' && window.location.port === '51708'; - const isPort51708 = typeof window !== 'undefined' && window.location.port === '5178'; + const isPort51707 = typeof window !== 'undefined' && window.location.port === '51707'; // 根据当前应用模式过滤菜单项 const filteredMenuItems = menuItems.filter(item => { - // 如果是51708端口,只显示交叉评查相关菜单 - if (isPort51708) { + // 如果是51707端口,只显示交叉评查相关菜单 + if (isPort51707) { // 如果当前应用是智慧法务大模型,只显示AI对话菜单 if (currentApp === 'model') { return item.id === 'chat-with-llm' || diff --git a/app/config/api-config.ts b/app/config/api-config.ts index 6b78c4e..d335e6b 100644 --- a/app/config/api-config.ts +++ b/app/config/api-config.ts @@ -156,7 +156,8 @@ const configs: Record = { // 文件上传 uploadUrl: 'http://10.79.97.17:8000/admin/documents', oauth: { - serverUrl: 'http://10.79.112.85', // IDaaS服务器地址 + serverUrl: 'http://10.79.112.85', // IDaaS服务器地址(测试) + // serverUrl: 'http://10.79.97.252', // IDaaS服务器地址(生产) clientId: '54d2a619fe5c81ae1250434c441fccccqMtKwh7H4fO', // clientSecret: 'VYk1AC5XIJEfnEXwyq0u9JEY3fi3byCfSD58zANGeb', // 需要替换为实际的Client Secret // ⚠️ 安全警告:clientSecret 不应该硬编码在代码中 diff --git a/app/root.tsx b/app/root.tsx index ad87a5d..133b11f 100644 --- a/app/root.tsx +++ b/app/root.tsx @@ -109,9 +109,9 @@ export async function loader({ request }: LoaderFunctionArgs) { return redirect("/"); } - // 检查5178端口访问控制 + // 检查51707端口访问控制 - // 由于应用直接运行在5178端口,我们需要从环境变量或运行时获取端口 + // 由于应用直接运行在51707端口,我们需要从环境变量或运行时获取端口 const currentPort = process.env.PORT || process.env.API_PORT_CONFIG; // console.log("currentPort-----------",currentPort) @@ -119,17 +119,17 @@ export async function loader({ request }: LoaderFunctionArgs) { const runtimePort = url.port || currentPort; // console.log("runtimePort-----------",runtimePort) - const isPort51708 = currentPort === '5178' || runtimePort === '5178'; + const isPort51707 = currentPort === '51707' || runtimePort === '51707'; - if (isPort51708 && !isPublicPath) { - // 51708端口只允许访问交叉评查相关路径和首页 + if (isPort51707 && !isPublicPath) { + // 51707端口(省局)只允许访问交叉评查相关路径和首页 const allowedPaths = ['/', '/cross-checking','/chat-with-llm']; const isAllowedPath = allowedPaths.some(path => pathname === path) || pathname.startsWith('/cross-checking/') || pathname.startsWith('/chat-with-llm/'); if (!isAllowedPath) { - // console.log("5178端口访问受限,重定向到交叉评查页面"); + // console.log("51707端口访问受限,重定向到交叉评查页面"); return redirect("/cross-checking"); } } diff --git a/app/routes/_index.tsx b/app/routes/_index.tsx index 021003c..7b77c96 100644 --- a/app/routes/_index.tsx +++ b/app/routes/_index.tsx @@ -46,13 +46,13 @@ export default function Index() { time: '' }); - // 检查是否通过51708端口访问 - const [isPort51708, setIsPort51708] = useState(false); + // 检查是否通过51707端口访问 + const [isPort51707, setIsPort51707] = useState(false); useEffect(() => { if (typeof window !== 'undefined') { - setIsPort51708(window.location.port === '51708'); - // setIsPort51708(window.location.port === '5178'); + setIsPort51707(window.location.port === '51707'); + // setIsPort51707(window.location.port === '5178'); } }, []); @@ -163,7 +163,7 @@ export default function Index() {
{/* 合同管理模块 - 51708端口时隐藏 */} - {!isPort51708 && ( + {!isPort51707 && (
handleModuleClick('/contract-template/search', 'contract')}