添加管理员登陆,添加nginx反向代理配置,

This commit is contained in:
2025-07-27 20:01:36 +08:00
parent 9a366d042a
commit 33363aba78
17 changed files with 2010 additions and 836 deletions
+24 -12
View File
@@ -45,6 +45,16 @@ export default function Index() {
date: '',
time: ''
});
// 检查是否通过51708端口访问
const [isPort51708, setIsPort51708] = useState(false);
useEffect(() => {
if (typeof window !== 'undefined') {
// setIsPort51708(window.location.port === '51708');
setIsPort51708(window.location.port === '5178');
}
}, []);
// 打印服务器端传递的用户角色
useEffect(() => {
@@ -142,18 +152,20 @@ export default function Index() {
<h1 className="welcome-text">- -</h1>
<div className="modules-container">
{/* 合同管理模块 */}
<div
className="module-card"
onClick={() => handleModuleClick('/contract-template/search', 'contract')}
onKeyDown={(e) => handleKeyDown('/contract-template/search', 'contract', e)}
role="button"
tabIndex={0}
aria-label="合同管理"
>
<img src="/images/icon_hetong.png" alt="合同管理" className="w-12 h-12 mx-1" />
<span className="module-name"></span>
</div>
{/* 合同管理模块 - 51708端口时隐藏 */}
{!isPort51708 && (
<div
className="module-card"
onClick={() => handleModuleClick('/contract-template/search', 'contract')}
onKeyDown={(e) => handleKeyDown('/contract-template/search', 'contract', e)}
role="button"
tabIndex={0}
aria-label="合同管理"
>
<img src="/images/icon_hetong.png" alt="合同管理" className="w-12 h-12 mx-1" />
<span className="module-name"></span>
</div>
)}
{/* 案卷智能评查模块 */}
<div