feat:优化信息
This commit is contained in:
@ -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) {
|
||||
|
@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user