wyling 3 years ago
parent
commit
8926ac0926
1 changed files with 27 additions and 29 deletions
  1. 27 29
      src/views/teachingVideo/info/index.vue

+ 27 - 29
src/views/teachingVideo/info/index.vue

@@ -402,36 +402,34 @@ export default {
     },
     /** 提交按钮 */
     submitForm: function() {
-      if (this.validate(this.form)) {
-        if (this.form.id != undefined) {
-          let data = {
-            teachingVideoTypeId: this.form.teachingVideoTypeId,
-            id: this.form.id,
-            title: this.form.title,
-            videoDescribe: this.form.videoDescribe,
-            videoFileId: this.form.vodVideoFileId,
-            coverFileId: this.form.coverFileId
-          }
-          updateUser(data).then(response => {
-            this.msgSuccess('修改成功')
-            this.open = false
-            this.getList()
-          })
-        } else {
-          let data = {
-            teachingVideoTypeId: this.teachingVideoTypeId,
-            id: this.form.id,
-            title: this.form.title,
-            videoDescribe: this.form.videoDescribe,
-            videoFileId: this.form.vodVideoFileId,
-            coverFileId: this.form.coverFileId
-          }
-          addUser(data).then(response => {
-            this.msgSuccess('新增成功')
-            this.open = false
-            this.getList()
-          })
+      if (this.form.id != undefined) {
+        let data = {
+          teachingVideoTypeId: this.form.teachingVideoTypeId,
+          id: this.form.id,
+          title: this.form.title,
+          videoDescribe: this.form.videoDescribe,
+          videoFileId: this.form.vodVideoFileId,
+          coverFileId: this.form.coverFileId
         }
+        updateUser(data).then(response => {
+          this.msgSuccess('修改成功')
+          this.open = false
+          this.getList()
+        })
+      } else {
+        let data = {
+          teachingVideoTypeId: this.teachingVideoTypeId,
+          id: this.form.id,
+          title: this.form.title,
+          videoDescribe: this.form.videoDescribe,
+          videoFileId: this.form.vodVideoFileId,
+          coverFileId: this.form.coverFileId
+        }
+        addUser(data).then(response => {
+          this.msgSuccess('新增成功')
+          this.open = false
+          this.getList()
+        })
       }
     },
     /** 删除按钮操作 */