This commit is contained in:
2026-06-29 11:46:10 +08:00
parent 31d2a0d6cd
commit f4a6be6e39
8 changed files with 63 additions and 44 deletions
+8 -1
View File
@@ -57,7 +57,14 @@ const AdminSettings: React.FC = () => {
// Update local state
setConfigs(prev => prev.map(c => c.key === configKey ? { ...c, value: res.url } : c));
form.setFieldsValue({ [configKey]: res.url });
message.success('PDF上传成功');
// Find the config and update to database
const config = configs.find(c => c.key === configKey);
if (config) {
await updateSystemConfig(config.id, res.url);
}
message.success('PDF上传成功并已保存');
} catch {
message.error('上传失败');
} finally {