feat: 1. 修改完善全局路由检测。 2. 完善统一的token认证管理,token失效自动跳转到登录页。

This commit is contained in:
2025-11-18 20:32:43 +08:00
parent e7b1c2e294
commit adfb84a31d
17 changed files with 270 additions and 294 deletions
+4 -4
View File
@@ -504,7 +504,7 @@ export default function RulesIndex() {
// 复制评查点
const handleCopy = (rule: Rule) => {
navigate(`/rules-new?id=${rule.id}&mode=copy`);
navigate(`/rules/new?id=${rule.id}&mode=copy`);
};
const handlePageChange = (page: number) => {
@@ -618,7 +618,7 @@ export default function RulesIndex() {
{isDeveloper ? (
// 开发者可以看到编辑、复制、删除
<>
<Link to={`/rules-new?id=${record.id}`} className="operation-btn">
<Link to={`/rules/new?id=${record.id}`} className="operation-btn">
<i className="ri-edit-line"></i>
</Link>
<button className="operation-btn" onClick={() => handleCopy(record)}>
@@ -630,7 +630,7 @@ export default function RulesIndex() {
</>
) : (
// 普通用户只能查看
<Link to={`/rules-new?id=${record.id}&mode=view`} className="operation-btn">
<Link to={`/rules/new?id=${record.id}&mode=view`} className="operation-btn">
<i className="ri-eye-line"></i>
</Link>
)}
@@ -658,7 +658,7 @@ export default function RulesIndex() {
)}
</div>
{isDeveloper && (
<Button type="primary" icon="ri-add-line" to="/rules-new" className="btn-add-rule">
<Button type="primary" icon="ri-add-line" to="/rules/new" className="btn-add-rule">
</Button>
)}