feat:优化信息

This commit is contained in:
henry
2021-11-23 09:38:59 +08:00
parent 7eacb35ae8
commit ee5a4b9cf6
5 changed files with 10 additions and 2 deletions

View File

@ -34,6 +34,8 @@ func (c *Instance) Login(account, password, captchaKey, captchaValue, ip string)
return nil, err
} else if !isExist {
return nil, errors.New("操作错误,该帐号信息不存在")
} else if mSysUser.Status != model2.SysUserStatusForNormal {
return nil, errors.New("操作错误,该账号已被禁用,请联系管理员")
}
if !mSysUser.ValidatePassword(password) {

View File

@ -4,6 +4,8 @@ import (
"ArmedPolice/app/controller/menu"
"ArmedPolice/app/model"
"ArmedPolice/app/service"
"ArmedPolice/utils"
"fmt"
)
type Menu struct{ *service.Session }
@ -26,6 +28,7 @@ func (c *Menu) Menu() ([]*menu.InstanceIdentityInfo, error) {
if out, err = mSysMenu.UserMenu(c.UID); err != nil {
return nil, err
}
fmt.Println(utils.AnyToJSON(out))
RETURN:
return menu.TreeIdentity(mSysMenu.SysMenu, out, 0), nil
}