1
This commit is contained in:
Vendored
+29
-29
File diff suppressed because one or more lines are too long
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user