增加默认密码;修改curd返回异常信息;去除admin表username唯一值;

This commit is contained in:
2022-10-29 11:29:25 +08:00
parent fa635ba3ac
commit d1c9004ffa
5 changed files with 29 additions and 7 deletions

View File

@@ -79,7 +79,7 @@ trait Curd
try {
$save = $row->save($post);
} catch (\Exception $e) {
$this->error('保存失败');
$this->error('保存失败:' . $e->getMessage());
}
$save ? $this->success('保存成功') : $this->error('保存失败');
}
@@ -98,7 +98,7 @@ trait Curd
try {
$save = $row->delete();
} catch (\Exception $e) {
$this->error('删除失败');
$this->error('删除失败:' . $e->getMessage());
}
$save ? $this->success('删除成功') : $this->error('删除失败');
}
@@ -156,7 +156,7 @@ trait Curd
$post['field'] => $post['value'],
]);
} catch (\Exception $e) {
$this->error($e->getMessage());
$this->error('修改失败:' . $e->getMessage());
}
$this->success('保存成功');
}