diff --git a/frontend/src/components/GlobalConfig.jsx b/frontend/src/components/GlobalConfig.jsx index bca3526..adfc637 100644 --- a/frontend/src/components/GlobalConfig.jsx +++ b/frontend/src/components/GlobalConfig.jsx @@ -298,62 +298,6 @@ const GlobalConfig = ({ currentUser }) => { // eslint-disable-next-line react-hooks/exhaustive-deps }, [isAdmin]) - const loadUsers = async () => { - try { - const list = await api.getUsers() - setUsers(Array.isArray(list) ? list : []) - } catch (error) { - setMessage('加载用户列表失败: ' + (error.message || '未知错误')) - } finally { - setLoading(false) - } - } - - const loadAccounts = async () => { - try { - const list = await api.getAccounts() - setAccounts(Array.isArray(list) ? list : []) - } catch (error) { - console.error('加载账号列表失败:', error) - } - } - - const loadConfigMeta = async () => { - try { - const m = await api.getConfigMeta() - setConfigMeta(m || null) - } catch (e) { - setConfigMeta(null) - } - } - - const loadConfigs = async () => { - try { - const data = await api.getConfigs() - setConfigs(data) - } catch (error) { - console.error('Failed to load configs:', error) - } - } - - const loadSystemStatus = async () => { - try { - const res = await api.getTradingSystemStatus() - setSystemStatus(res) - } catch (error) { - // 静默失败 - } - } - - const loadBackendStatus = async () => { - try { - const res = await api.getBackendStatus() - setBackendStatus(res) - } catch (error) { - // 静默失败 - } - } - // 系统控制函数 const handleClearCache = async () => { setSystemBusy(true)