Browse Source

添加活动删除失败提示

asd123a20 2 years ago
parent
commit
3cf695b8d3
1 changed files with 6 additions and 2 deletions
  1. 6 2
      src/views/activity/index.vue

+ 6 - 2
src/views/activity/index.vue

@@ -322,11 +322,12 @@ export default {
     /** 新增按钮操作 */
     handleAdd() {
       this.reset();
+      this.form = {};
       this.open = true;
       this.title = "添加活动管理";
     },
     /** 修改按钮操作 */
-    handleUpdate(row) {
+    async handleUpdate(row) {
       this.reset();
       const activityId = row.activityId || this.ids
       getActivity(activityId).then(response => {
@@ -363,7 +364,10 @@ export default {
       }).then(() => {
         this.getList();
         this.$modal.msgSuccess("删除成功");
-      }).catch(() => {});
+      }).catch((err) => {
+        console.log(err);
+        this.$modal.msgSuccess(err.msg);
+      });
     },
     handleEnd(row) {
       const { activityId } = row;