|
|
@@ -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('请输入新密码', '重置密码', {
|