fix: 1. 系统设置入口进来只会跳转到拥有权限访问的页面。

2. 优化登录样式
This commit is contained in:
2025-11-26 18:05:15 +08:00
parent efbf78246f
commit 1b0108e518
6 changed files with 179 additions and 28 deletions
+6 -4
View File
@@ -417,7 +417,7 @@ export default function DocumentEdit() {
// 下载文档
const downloadDocument = async () => {
try {
// 使用 PDF 代理路由获取文件,自动添加 JWT 认证
// 使用 PDF 代理路由获取文件,自动添加 JWT 认证(默认行为是下载)
const downloadUrl = `/api/pdf-proxy?path=${encodeURIComponent(documentData.path)}`;
// 使用fetch获取文件内容
@@ -457,8 +457,8 @@ export default function DocumentEdit() {
// 在新窗口打开文档预览
const openPreview = () => {
// 使用 PDF 代理路由,自动添加 JWT 认证
const previewUrl = `/api/pdf-proxy?path=${encodeURIComponent(documentData.path)}`;
// 使用 PDF 代理路由,自动添加 JWT 认证,添加 preview 参数实现预览
const previewUrl = `/api/pdf-proxy?path=${encodeURIComponent(documentData.path)}&preview=true`;
window.open(previewUrl, '_blank');
};
@@ -622,7 +622,7 @@ export default function DocumentEdit() {
</Card>
{/* 文档预览 */}
<Card
{ false && <Card
title="文档预览"
className="mb-4"
>
@@ -662,6 +662,8 @@ export default function DocumentEdit() {
)}
</div>
</Card>
}
{/* 修改历史 */}
<Card title="修改历史" className="hidden">