guhongwei 2 år sedan
förälder
incheckning
c7eefc6a8d
1 ändrade filer med 2 tillägg och 4 borttagningar
  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();
         }
       }