瀏覽代碼

update

master
dengbiao 1 天之前
父節點
當前提交
f4335088d3
共有 4 個檔案被更改,包括 75 行新增4 行删除
  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 查看文件

@@ -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 查看文件

@@ -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 查看文件

@@ -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 查看文件

@@ -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…
取消
儲存