Parcourir la source

update

master
dengbiao il y a 1 mois
Parent
révision
f4335088d3
4 fichiers modifiés avec 75 ajouts et 4 suppressions
  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 Voir le fichier

@@ -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 Voir le fichier

@@ -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 Voir le fichier

@@ -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 Voir le fichier

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


Chargement…
Annuler
Enregistrer