tangning 2 years ago
parent
commit
51b0ca53fb
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/views/empower/AddInstallModal.vue

+ 2 - 2
src/views/empower/AddInstallModal.vue

@@ -107,7 +107,7 @@
       }
       async function handleConfirm() {
         const { id, machineCode } = await validate();
-        let res = await checkMachineCode({ machineCode });
+        let res = await checkMachineCode({ machineCode:machineCode.trim() });
         console.log('res', res, !id);
         if (!id && res && res.id) {
           createConfirm({
@@ -137,7 +137,7 @@
           const apiData = {
             ...params,
             snCodes:params.snCodes && params.snCodes.replace(/\s*/g,""),
-            machineCode:params.machineCode && params.machineCode.replace(/\s*/g,""),
+            machineCode:params.machineCode.replace(/\s*/g,""),
             userId: params.id,
           };
           let res = await authorizeInstalladdOrUpdate(apiData);