Ritchie 1 год назад
Родитель
Сommit
dcf21f8a39
1 измененных файлов с 7 добавлено и 7 удалено
  1. 7 7
      src/views/hotUpdate/index.vue

+ 7 - 7
src/views/hotUpdate/index.vue

@@ -34,8 +34,8 @@
                 <van-field v-model="clientId" rows="2" autosize name="clientId" label="设备编号:" type="textarea" clearable
                     placeholder="选填clientId,使用','隔开" :disabled="hasTargetAreas" maxlength="230" show-word-limit />
                 <!-- 补丁更新内容note -->
-                <van-field v-model="note" name="note" label="更新内容:" placeholder="补丁更新内容(选填)" clearable rows="2"
-                    autosize maxlength="50" show-word-limit type="textarea" />
+                <van-field v-model="note" name="note" label="更新内容:" placeholder="补丁更新内容(选填)" clearable rows="2" autosize
+                    maxlength="50" show-word-limit type="textarea" />
 
             </van-cell-group>
             <br>
@@ -77,14 +77,14 @@ export default {
 
         // 点击提交
         const onSubmit = async () => {
-            if(targetAreasBlock.value.length === 0) {
+            if (targetAreasBlock.value.length === 0) {
                 targetAreas.value = '0';
-            } else if(targetAreasBlock.value.length === 1){
+            } else if (targetAreasBlock.value.length === 1) {
                 targetAreas.value = targetAreasBlock.value[0];
             } else {
                 targetAreas.value = '3';
             }
-            console.log("targetAreas >>> ", targetAreas.value);
+            // console.log("targetAreas >>> ", targetAreas.value);
             const patchInfoCheck = {
                 patchVersion: patchVersion.value,
                 patchStatus: patchStatus.value,
@@ -94,11 +94,11 @@ export default {
                 note: note.value
             }
             try {
-                const data = await postPatchInfo(patchInfoCheck);
+                const { data } = await postPatchInfo(patchInfoCheck);
                 if (data.code === '00000') {
                     showToast('提交成功', 'success');
                 } else {
-                    showFailToast('提交失败');
+                    showFailToast(data.message);
                 }
                 // 提交成功后重置表单
                 resetForm();