From 8d1e833d2f3524d2bbb23f637b959e03b3795bba Mon Sep 17 00:00:00 2001 From: DengBiao <2319963317@qq.com> Date: Fri, 18 Aug 2023 15:12:22 +0800 Subject: [PATCH] update --- app/admin/hdl/hdl_login.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/admin/hdl/hdl_login.go b/app/admin/hdl/hdl_login.go index 28869ad..521dc65 100644 --- a/app/admin/hdl/hdl_login.go +++ b/app/admin/hdl/hdl_login.go @@ -27,6 +27,10 @@ func Login(c *gin.Context) { e.OutErr(c, e.ERR_DB_ORM, err) return } + if admin == nil { + e.OutErr(c, e.ERR_NO_DATA, "账号不存在!") + return + } if utils.Md5(req.PassWord) != admin.Password { e.OutErr(c, e.ERR_INVALID_ARGS, "密码错误") return