From 9591be883fb41c8d04488cc62b8035924eb739f8 Mon Sep 17 00:00:00 2001 From: zhangwenjian Date: Fri, 25 Jun 2021 11:34:26 +0800 Subject: [PATCH] =?UTF-8?q?refactor=F0=9F=8E=A8=EF=BC=9A=E7=99=BB=E9=99=86?= =?UTF-8?q?=E6=A8=A1=E5=9D=97=E6=8E=A5=E5=8F=A3=E6=96=87=E6=A1=A3=E6=95=B4?= =?UTF-8?q?=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/admin/apis/captcha.go | 7 +++++++ app/admin/apis/sys_user.go | 2 -- common/middleware/handler/auth.go | 1 + 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/app/admin/apis/captcha.go b/app/admin/apis/captcha.go index b258e27..708a2bc 100644 --- a/app/admin/apis/captcha.go +++ b/app/admin/apis/captcha.go @@ -10,6 +10,13 @@ type System struct { api.Api } +// GenerateCaptchaHandler 获取验证码 +// @Summary 获取验证码 +// @Description 获取验证码 +// @Tags 登陆 +// @Success 200 {object} response.Response{data=string,id=string,msg=string} "{"code": 200, "data": [...]}" +// @Router /api/v1/captcha [get] +// @Security Bearer func (e System) GenerateCaptchaHandler(c *gin.Context) { err := e.MakeContext(c).Errors if err != nil { diff --git a/app/admin/apis/sys_user.go b/app/admin/apis/sys_user.go index 7ba1d60..747d8eb 100644 --- a/app/admin/apis/sys_user.go +++ b/app/admin/apis/sys_user.go @@ -415,8 +415,6 @@ func (e SysUser) GetInfo(c *gin.Context) { permissions[0] = "*:*:*" var buttons = make([]string, 1) buttons[0] = "*:*:*" - //RoleMenu := models.RoleMenu{} - //RoleMenu.RoleId = user.GetRoleId(c) var mp = make(map[string]interface{}) mp["roles"] = roles diff --git a/common/middleware/handler/auth.go b/common/middleware/handler/auth.go index fcb79c7..45dbb69 100644 --- a/common/middleware/handler/auth.go +++ b/common/middleware/handler/auth.go @@ -57,6 +57,7 @@ func IdentityHandler(c *gin.Context) interface{} { // @Description Reply will be of the form {"token": "TOKEN"}. // @Description dev mode:It should be noted that all fields cannot be empty, and a value of 0 can be passed in addition to the account password // @Description 注意:开发模式:需要注意全部字段不能为空,账号密码外可以传入0值 +// @Tags 登陆 // @Accept application/json // @Product application/json // @Param account body Login true "account"