diff --git a/src/modules/api-keys.js b/src/modules/api-keys.js index e5c0bb4..ef840d6 100644 --- a/src/modules/api-keys.js +++ b/src/modules/api-keys.js @@ -2,10 +2,10 @@ export const apiKeysModule = { // 加载API密钥 async loadApiKeys() { try { - const config = await this.getConfig(); - if (config['api-keys']) { - this.renderApiKeys(config['api-keys']); - } + const data = await this.makeRequest('/api-keys'); + const apiKeysValue = data?.['api-keys'] || []; + const keys = Array.isArray(apiKeysValue) ? apiKeysValue : []; + this.renderApiKeys(keys); } catch (error) { console.error('加载API密钥失败:', error); } diff --git a/src/utils/constants.js b/src/utils/constants.js index 28da0a9..a50a05c 100644 --- a/src/utils/constants.js +++ b/src/utils/constants.js @@ -51,7 +51,7 @@ export const OAUTH_MAX_POLL_DURATION_MS = 5 * 60 * 1000; * 最大日志显示行数 * 限制内存占用,避免大量日志导致页面卡顿 */ -export const MAX_LOG_LINES = 10000; +export const MAX_LOG_LINES = 2000; /** * 认证文件列表默认每页显示数量