xujunjie 1 ano atrás
pai
commit
53d01df731
1 arquivos alterados com 6 adições e 2 exclusões
  1. 6 2
      src/pages/SafetyManagement/Command/index.js

+ 6 - 2
src/pages/SafetyManagement/Command/index.js

@@ -26,10 +26,13 @@ const CommandModal = () => {
     const pw = md5(value);
     const res = await checkPW({ pw });
     if (res) {
-      UnityAction.sendMsg();
+      UnityAction.sendMsg('CommandSuccess');
       // message.success('已切换成【控制模式】');
     }
   };
+  const handleClose = () => {
+    UnityAction.sendMsg('CommandClose');
+  };
   return (
     <div className={styles.modelMain}>
       <Modal
@@ -39,7 +42,8 @@ const CommandModal = () => {
         width={640}
         open={true}
         footer={null}
-        closable={false}
+        // closable={false}
+        onCancel={handleClose}
       >
         <div className={styles.upContent}>
           {new Array(8).fill('').map((item, idx) => (