Browse Source

update

master
dengbiao 3 months 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 手机号注册
// @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]


+ 27
- 1
docs/docs.go View File

@@ -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": {


+ 27
- 1
docs/swagger.json View File

@@ -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": {


+ 20
- 1
docs/swagger.yaml View File

@@ -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:


Loading…
Cancel
Save