|
|
@@ -66,13 +66,18 @@ func Login(c *gin.Context) { |
|
|
|
// @Accept json |
|
|
|
// @Produce json |
|
|
|
// @Param req body md.LoginReq true "用户名密码" |
|
|
|
// @Success 200 {object} md.LoginResponse "token" |
|
|
|
// @Success 200 {object} md.LoginInfoResponse "token" |
|
|
|
// @Failure 400 {object} md.Response "具体错误" |
|
|
|
// @Router /api/loginInfo [GET] |
|
|
|
func LoginInfo(c *gin.Context) { |
|
|
|
admin := svc.GetUser(c) |
|
|
|
e.OutSuc(c, md.LoginResponse{ |
|
|
|
Token: token, |
|
|
|
e.OutSuc(c, md.LoginInfoResponse{ |
|
|
|
AdmId: admin.AdmId, |
|
|
|
Username: admin.Username, |
|
|
|
IsSuperAdministrator: admin.IsSuperAdministrator, |
|
|
|
Memo: admin.Memo, |
|
|
|
CreateAt: admin.CreateAt, |
|
|
|
UpdateAt: admin.UpdateAt, |
|
|
|
}, nil) |
|
|
|
return |
|
|
|
} |