From a86903fcdc48e464553d0d414f675dd0f044c694 Mon Sep 17 00:00:00 2001 From: 237899745 <237899745@qq.com> Date: Thu, 22 Jan 2026 19:50:29 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E6=99=AE=E9=80=9A?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E7=99=BB=E5=BD=95=E5=92=8C=E8=AE=BF=E9=97=AE?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E6=97=B6=E7=9A=84OSS=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E6=A3=80=E6=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 登录流程:当没有OSS配置时显示友好警告而不是权限错误 - 文件访问:在调用API前检查OSS配置,避免后端报错 - 更新JS版本号强制刷新缓存 Co-Authored-By: Claude Opus 4.5 --- frontend/app.html | 2 +- frontend/app.js | 13 ++++++++++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/frontend/app.html b/frontend/app.html index 003260a..0608feb 100644 --- a/frontend/app.html +++ b/frontend/app.html @@ -3520,6 +3520,6 @@ } - + diff --git a/frontend/app.js b/frontend/app.js index 030c05e..3acd9bf 100644 --- a/frontend/app.js +++ b/frontend/app.js @@ -693,8 +693,8 @@ handleDragLeave(e) { this.loadFiles('/'); } else { this.currentView = 'settings'; - this.showToast('info', '欢迎', '请先配置您的OSS服务'); - this.openOssConfigModal(); + this.showToast('warning', 'OSS未配置', '系统尚未配置OSS存储服务,请联系管理员进行配置'); + // 普通用户不需要打开配置弹窗,等待管理员配置 } } else { // 默认行为:跳转到文件页面 @@ -1287,6 +1287,13 @@ handleDragLeave(e) { // ===== 文件管理 ===== async loadFiles(path) { + // 检查是否有可用的存储配置 + if (this.storagePermission === 'oss_only' && this.user?.oss_config_source === 'none') { + this.showToast('warning', '无法访问文件', 'OSS存储未配置,请联系管理员进行配置'); + this.currentView = 'settings'; + return; + } + this.loading = true; // 确保路径不为undefined this.currentPath = path || '/'; @@ -2557,7 +2564,7 @@ handleDragLeave(e) { }, ensureOssConfigSection() { - this.openOssConfigModal(); + // 普通用户不需要打开配置弹窗,等待管理员配置 }, openOssGuideModal() {