guhongwei 2 년 전
부모
커밋
c7eefc6a8d
1개의 변경된 파일2개의 추가작업 그리고 4개의 파일을 삭제
  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();
         }
       }