From 9e55c56a4f0ab2cf6becc531dd736f18484ddbb0 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Sat, 10 Oct 2020 17:56:06 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E4=B8=8D=E5=BF=85=E8=A6=81?= =?UTF-8?q?=E7=9A=84=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/resources/vm/vue/index-tree.vue.vm | 18 +++++++----------- src/main/resources/vm/vue/index.vue.vm | 20 ++++++++------------ 2 files changed, 15 insertions(+), 23 deletions(-) diff --git a/src/main/resources/vm/vue/index-tree.vue.vm b/src/main/resources/vm/vue/index-tree.vue.vm index 10a9862..e139a13 100644 --- a/src/main/resources/vm/vue/index-tree.vue.vm +++ b/src/main/resources/vm/vue/index-tree.vue.vm @@ -420,19 +420,15 @@ export default { #end if (this.form.${pkColumn.javaField} != null) { update${BusinessName}(this.form).then(response => { - if (response.code === 200) { - this.msgSuccess("修改成功"); - this.open = false; - this.getList(); - } + this.msgSuccess("修改成功"); + this.open = false; + this.getList(); }); } else { add${BusinessName}(this.form).then(response => { - if (response.code === 200) { - this.msgSuccess("新增成功"); - this.open = false; - this.getList(); - } + this.msgSuccess("新增成功"); + this.open = false; + this.getList(); }); } } @@ -449,7 +445,7 @@ export default { }).then(() => { this.getList(); this.msgSuccess("删除成功"); - }).catch(function() {}); + }) } } }; diff --git a/src/main/resources/vm/vue/index.vue.vm b/src/main/resources/vm/vue/index.vue.vm index e37e112..23decc6 100644 --- a/src/main/resources/vm/vue/index.vue.vm +++ b/src/main/resources/vm/vue/index.vue.vm @@ -436,19 +436,15 @@ export default { #end if (this.form.${pkColumn.javaField} != null) { update${BusinessName}(this.form).then(response => { - if (response.code === 200) { - this.msgSuccess("修改成功"); - this.open = false; - this.getList(); - } + this.msgSuccess("修改成功"); + this.open = false; + this.getList(); }); } else { add${BusinessName}(this.form).then(response => { - if (response.code === 200) { - this.msgSuccess("新增成功"); - this.open = false; - this.getList(); - } + this.msgSuccess("新增成功"); + this.open = false; + this.getList(); }); } } @@ -466,7 +462,7 @@ export default { }).then(() => { this.getList(); this.msgSuccess("删除成功"); - }).catch(function() {}); + }) }, /** 导出按钮操作 */ handleExport() { @@ -479,7 +475,7 @@ export default { return export${BusinessName}(queryParams); }).then(response => { this.download(response.msg); - }).catch(function() {}); + }) } } };