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();
         }
       }