guhongwei 2 năm trước cách đây
mục cha
commit
c7eefc6a8d
1 tập tin đã thay đổi với 2 bổ sung4 xóa
  1. 2 4
      src/views/account/users/detail.vue

+ 2 - 4
src/views/account/users/detail.vue

@@ -42,14 +42,12 @@ export default {
     async onSubmit({ data }) {
       if (this.id) {
         let res = await this.update(data);
-        if (this.$checkRes(res)) {
-          this.$toast({ type: `success`, message: `操作成功` });
+        if (this.$checkRes(res, `操作成功`, `${res.errmsg}`)) {
           this.back();
         }
       } else {
         let res = await this.create(data);
-        if (this.$checkRes(res)) {
-          this.$toast({ type: `success`, message: `操作成功` });
+        if (this.$checkRes(res, `操作成功`, `${res.errmsg}`)) {
           this.back();
         }
       }