chore: 统一代码风格并配置ESLint和Prettier

配置ESLint和Prettier规则
添加前端和后端的忽略文件
统一代码格式和缩进
修复代码风格问题
This commit is contained in:
zhang1106
2026-02-10 11:04:01 +08:00
parent f82d82e57e
commit afc372a432
61 changed files with 14976 additions and 6124 deletions
+6 -6
View File
@@ -17,7 +17,7 @@ export const ConfigProvider = ({ children }) => {
date_format: 'YYYY-MM-DD',
session_timeout: 30,
max_login_attempts: 5,
maintenance_mode: false
maintenance_mode: false,
});
const [loading, setLoading] = useState(true);
@@ -27,15 +27,15 @@ export const ConfigProvider = ({ children }) => {
const response = await axios.get('/api/system-settings');
const settings = response.data;
const configValues = {};
// 将配置转换为扁平结构
Object.entries(settings).forEach(([key, value]) => {
configValues[key] = value.value;
});
setConfig(prev => ({
...prev,
...configValues
...configValues,
}));
} catch (error) {
console.error('加载系统配置失败:', error);
@@ -50,10 +50,10 @@ export const ConfigProvider = ({ children }) => {
}, []);
// 更新配置
const updateConfig = (newConfig) => {
const updateConfig = newConfig => {
setConfig(prev => ({
...prev,
...newConfig
...newConfig,
}));
};