Browse Source

update

master
dengbiao 1 day ago
parent
commit
f4335088d3
4 changed files with 75 additions and 4 deletions
  1. +1
    -1
      app/hdl/hdl_login.go
  2. +27
    -1
      docs/docs.go
  3. +27
    -1
      docs/swagger.json
  4. +20
    -1
      docs/swagger.yaml

+ 1
- 1
app/hdl/hdl_login.go View File

@@ -117,7 +117,7 @@ func LoginPhone(c *gin.Context) {
// @Description 手机号注册 // @Description 手机号注册
// @Accept json // @Accept json
// @Produce json // @Produce json
// @Param req body md.LoginReq true "用户名、验证码"
// @Param req body md.RegisterReq true "用户名、验证码"
// @Success 200 {object} md.LoginResponse "token" // @Success 200 {object} md.LoginResponse "token"
// @Failure 400 {object} md.Response "具体错误" // @Failure 400 {object} md.Response "具体错误"
// @Router /api/register [post] // @Router /api/register [post]


+ 27
- 1
docs/docs.go View File

@@ -1198,7 +1198,7 @@ const docTemplate = `{
"in": "body", "in": "body",
"required": true, "required": true,
"schema": { "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": { "md.Response": {
"type": "object", "type": "object",
"properties": { "properties": {


+ 27
- 1
docs/swagger.json View File

@@ -1190,7 +1190,7 @@
"in": "body", "in": "body",
"required": true, "required": true,
"schema": { "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": { "md.Response": {
"type": "object", "type": "object",
"properties": { "properties": {


+ 20
- 1
docs/swagger.yaml View File

@@ -755,6 +755,25 @@ definitions:
uuid: uuid:
type: string type: string
type: object 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: md.Response:
properties: properties:
code: code:
@@ -1764,7 +1783,7 @@ paths:
name: req name: req
required: true required: true
schema: schema:
$ref: '#/definitions/md.LoginReq'
$ref: '#/definitions/md.RegisterReq'
produces: produces:
- application/json - application/json
responses: responses:


Loading…
Cancel
Save