|
@@ -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) {
|