xiongzhu %!s(int64=4) %!d(string=hai) anos
pai
achega
3d96577e45
Modificáronse 1 ficheiros con 7 adicións e 12 borrados
  1. 7 12
      src/main/vue/src/views/UserEdit.vue

+ 7 - 12
src/main/vue/src/views/UserEdit.vue

@@ -139,22 +139,17 @@ export default {
             this.$confirm('确认删除吗?', '提示', { type: 'warning' })
                 .then(() => {
                     this.$http
-                        .post({
-                            url: '/userInfo/del',
-                            data: {
-                                id: this.formData.id
-                            }
+                        .post('/user/del', {
+                            id: this.formData.id
                         })
                         .then(res => {
-                            if (res.success) {
-                                this.$message.success('成功');
-                                this.$router.go(-1);
-                            } else {
-                                this.$message.warning('失败');
-                            }
+                            this.$message.success('成功');
+                            this.$router.go(-1);
                         });
                 })
-                .catch(() => {});
+                .catch(e => {
+                    this.$message.error(e.error || '删除失败');
+                });
         },
         resetPassword() {
             this.$prompt('请输入新密码', '重置密码', {