docs: 更新文档内容及结构调整

- 修复文档中的格式问题和错误
- 新增功能文档:数据迁移和管理后台
- 调整文档目录结构,将管理后台移至功能分类
- 更新API文档中的字段说明和响应示例
- 优化后端配置文档,移除冗余内容
This commit is contained in:
anghunk
2026-01-20 15:32:51 +08:00
parent 9d3d4f79a9
commit 4a4349e0b9
10 changed files with 216 additions and 299 deletions

View File

@@ -25,7 +25,8 @@ function loadConfigFromStorage() {
if (saved) {
return { ...DEFAULT_CONFIG, ...JSON.parse(saved) };
}
} catch (e) {}
} catch (e) {
}
return DEFAULT_CONFIG;
}
@@ -35,7 +36,8 @@ function loadConfigFromStorage() {
function saveConfigToStorage(config) {
try {
localStorage.setItem(STORAGE_KEY, JSON.stringify(config));
} catch (e) {}
} catch (e) {
}
}
/**
@@ -115,6 +117,7 @@ function toggleTheme() {
const config = getConfigFromInputs();
config.theme = newTheme;
saveConfigToStorage(config);
}
/**
@@ -124,7 +127,8 @@ function clearConfig() {
try {
localStorage.removeItem(STORAGE_KEY);
populateInputs(DEFAULT_CONFIG);
} catch (e) {}
} catch (e) {
}
}
// 将函数挂载到 window 对象,使其在 HTML 中可访问
@@ -134,6 +138,8 @@ window.clearConfig = clearConfig;
// 页面加载完成后自动初始化
document.addEventListener('DOMContentLoaded', () => {
// 从本地存储加载配置并填充到输入框
const savedConfig = loadConfigFromStorage();
populateInputs(savedConfig);