heyang 2 年 前
コミット
4a96085df3
共有1 個のファイルを変更した21 個の追加16 個の削除を含む
  1. 21 16
      src/views/system/apkfileList/index.vue

+ 21 - 16
src/views/system/apkfileList/index.vue

@@ -497,23 +497,28 @@ import {
           return
         }
         if(this.upForm.id){//编辑
-          let obj = {
-            id:this.upForm.id,
-            versionName:this.upForm.versionName,
-            version:this.upForm.version,
-            apkInfo:this.upForm.apkInfo,
-            onepcType:this.upForm.onepcType,
-            apkFileUpload:this.upForm.apkFileUpload,
-            fileData:JSON.stringify(this.fileData),
-          };
-          editApkList(obj).then( response => {
-            this.msgSuccess("编辑成功");
-            this.getList()
-            this.openUp = false;
-            this.upForm = {};
-            this.fileList=[];
-            this.fileData = {};
+          this.$refs["upForm"].validate(valid => {
+            if (valid) {
+              let obj = {
+                id:this.upForm.id,
+                versionName:this.upForm.versionName,
+                version:this.upForm.version,
+                apkInfo:this.upForm.apkInfo,
+                onepcType:this.upForm.onepcType,
+                apkFileUpload:this.upForm.apkFileUpload,
+                fileData:JSON.stringify(this.fileData),
+              };
+              editApkList(obj).then( response => {
+                this.msgSuccess("编辑成功");
+                this.getList()
+                this.openUp = false;
+                this.upForm = {};
+                this.fileList=[];
+                this.fileData = {};
+              });
+            }
           });
+
         }else{//添加
           this.$refs["upForm"].validate(valid => {
             if (valid) {