瀏覽代碼

账户配置页面 联调

jiayufei 4 年之前
父節點
當前提交
a1d41aad2b
共有 1 個文件被更改,包括 10 次插入11 次删除
  1. 10 11
      src/views/modules/account-config/components/configuration-modal.vue

+ 10 - 11
src/views/modules/account-config/components/configuration-modal.vue

@@ -978,19 +978,18 @@ export default {
             paramsFormData.adKeywords = this.creativeTag;
             paramsFormData.userId = this.userInfo().id;
             this.$refs.ruleForm.validate(valid => {
-                if (this.modalTitle === 'add') {
-                    this.handleAddList(paramsFormData);
+                if (valid) {
+                    if (this.modalTitle === 'add') {
+                        this.handleAddList(paramsFormData);
+                    }
+                    else if (this.modalTitle === 'edit') {
+                        this.handleEditList(paramsFormData);
+                    }
                 }
-                else if (this.modalTitle === 'edit') {
-                    this.handleEditList(paramsFormData);
+                else {
+                    console.log('error submit!!');
+                    return false;
                 }
-                // if (valid) {
-                //     this.handleAddList(paramsFormData);
-                // }
-                // else {
-                //     console.log('error submit!!');
-                //     return false;
-                // }
             });
         },
         handleEditList(data) {