|
@@ -37,7 +37,7 @@ func (a *AuthController) Login(c *gin.Context) {
|
|
|
emailItem := new(english_report_email.Email)
|
|
|
if req.Type == 1 {
|
|
|
_, err = emailItem.GetByEmail(req.Account)
|
|
|
- if err != nil {
|
|
|
+ if err != nil || emailItem.IsDeleted == 1 {
|
|
|
if err == utils.ErrNoRow {
|
|
|
resp.Unregistered("账号未注册", c)
|
|
|
return
|
|
@@ -45,10 +45,9 @@ func (a *AuthController) Login(c *gin.Context) {
|
|
|
resp.Unregistered("账号未注册.", c)
|
|
|
return
|
|
|
}
|
|
|
-
|
|
|
} else {
|
|
|
_, err := emailItem.GetByMobile(req.Account, req.CountryCode)
|
|
|
- if err != nil {
|
|
|
+ if err != nil || emailItem.IsDeleted == 1 {
|
|
|
if err == utils.ErrNoRow {
|
|
|
resp.Unbound("手机号未绑定", c)
|
|
|
return
|
|
@@ -226,7 +225,7 @@ func (a *AuthController) ModifyPwd(c *gin.Context) {
|
|
|
}
|
|
|
|
|
|
if req.OldPwd != userinfo.Password {
|
|
|
- resp.Fail("旧密码错误,请重新输入", c)
|
|
|
+ resp.Fail("The old password is wrong, please re-enter.", c)
|
|
|
return
|
|
|
}
|
|
|
|
|
@@ -500,7 +499,7 @@ func (a *AuthController) ModifyMobile(c *gin.Context) {
|
|
|
}
|
|
|
|
|
|
if req.OldMobile != userinfo.Mobile {
|
|
|
- resp.Fail("旧密码错误,请重新输入", c)
|
|
|
+ resp.Fail("The old password is wrong, please re-enter.", c)
|
|
|
return
|
|
|
}
|
|
|
|