Przeglądaj źródła

fix:修改传参

jinyupan 9 miesięcy temu
rodzic
commit
aea2c1ff17
2 zmienionych plików z 3 dodań i 0 usunięć
  1. 1 0
      src/components/ConfigModal.js
  2. 2 0
      src/services/config.js

+ 1 - 0
src/components/ConfigModal.js

@@ -33,6 +33,7 @@ export default class ConfigModal extends PureComponent {
   onOk() {
   onOk() {
     this.formRef.current.validateFields().then(values => {
     this.formRef.current.validateFields().then(values => {
       this.props.onOk({
       this.props.onOk({
+        hotUpdate: true,
         ...this.props.config,
         ...this.props.config,
         config: {
         config: {
           ...values,
           ...values,

+ 2 - 0
src/services/config.js

@@ -1,8 +1,10 @@
 import { request } from 'umi';
 import { request } from 'umi';
 
 
 export async function update(params) {
 export async function update(params) {
+  const { hotUpdate = false, ...configVO } = params;
   return request(`/api/config`, {
   return request(`/api/config`, {
     method: 'put',
     method: 'put',
     data: params,
     data: params,
+    params: { hotUpdate }
   });
   });
 }
 }