diff --git a/app/hdl/hdl_login.go b/app/hdl/hdl_login.go index b8955f2..70b4db4 100644 --- a/app/hdl/hdl_login.go +++ b/app/hdl/hdl_login.go @@ -117,7 +117,7 @@ func LoginPhone(c *gin.Context) { // @Description 手机号注册 // @Accept json // @Produce json -// @Param req body md.LoginReq true "用户名、验证码" +// @Param req body md.RegisterReq true "用户名、验证码" // @Success 200 {object} md.LoginResponse "token" // @Failure 400 {object} md.Response "具体错误" // @Router /api/register [post] diff --git a/docs/docs.go b/docs/docs.go index 6a07ef1..e4e689c 100644 --- a/docs/docs.go +++ b/docs/docs.go @@ -1198,7 +1198,7 @@ const docTemplate = `{ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/md.LoginReq" + "$ref": "#/definitions/md.RegisterReq" } } ], @@ -3193,6 +3193,32 @@ const docTemplate = `{ } } }, + "md.RegisterReq": { + "type": "object", + "required": [ + "captcha", + "password", + "username" + ], + "properties": { + "agent_id": { + "type": "string", + "example": "代理id" + }, + "captcha": { + "type": "string", + "example": "验证码" + }, + "password": { + "type": "string", + "example": "登录密码" + }, + "username": { + "type": "string", + "example": "登录账号" + } + } + }, "md.Response": { "type": "object", "properties": { diff --git a/docs/swagger.json b/docs/swagger.json index 6aba707..419e607 100644 --- a/docs/swagger.json +++ b/docs/swagger.json @@ -1190,7 +1190,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/md.LoginReq" + "$ref": "#/definitions/md.RegisterReq" } } ], @@ -3185,6 +3185,32 @@ } } }, + "md.RegisterReq": { + "type": "object", + "required": [ + "captcha", + "password", + "username" + ], + "properties": { + "agent_id": { + "type": "string", + "example": "代理id" + }, + "captcha": { + "type": "string", + "example": "验证码" + }, + "password": { + "type": "string", + "example": "登录密码" + }, + "username": { + "type": "string", + "example": "登录账号" + } + } + }, "md.Response": { "type": "object", "properties": { diff --git a/docs/swagger.yaml b/docs/swagger.yaml index 38a3da3..c67e198 100644 --- a/docs/swagger.yaml +++ b/docs/swagger.yaml @@ -755,6 +755,25 @@ definitions: uuid: type: string type: object + md.RegisterReq: + properties: + agent_id: + example: 代理id + type: string + captcha: + example: 验证码 + type: string + password: + example: 登录密码 + type: string + username: + example: 登录账号 + type: string + required: + - captcha + - password + - username + type: object md.Response: properties: code: @@ -1764,7 +1783,7 @@ paths: name: req required: true schema: - $ref: '#/definitions/md.LoginReq' + $ref: '#/definitions/md.RegisterReq' produces: - application/json responses: