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() {