用户登录注册修改密码接口

This commit is contained in:
pixelqm
2019-09-04 00:22:14 +08:00
parent b70ab642cb
commit 8eae7f186f
9 changed files with 363 additions and 53 deletions

View File

@@ -1,6 +1,6 @@
// GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
// This file was generated by swaggo/swag at
// 2019-09-03 14:28:38.1089338 +0800 CST m=+0.037899201
// 2019-09-03 23:59:41.1295277 +0800 CST m=+0.038362901
package docs
@@ -26,12 +26,77 @@ var doc = `{
"host": "{{.Host}}",
"basePath": "{{.BasePath}}",
"paths": {
"/user/changePassWord": {
"post": {
"produces": [
"application/json"
],
"tags": [
"User"
],
"summary": "用户修改密码",
"parameters": [
{
"description": "用户修改密码",
"name": "data",
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/api.ChangePassWordStutrc"
}
}
],
"responses": {
"200": {
"description": "{\"success\":true,\"data\":{},\"msg\":\"修改成功\"}",
"schema": {
"type": "string"
}
}
}
}
},
"/user/login": {
"post": {
"produces": [
"application/json"
],
"tags": [
"User"
],
"summary": "用户登录",
"parameters": [
{
"description": "用户登录接口",
"name": "data",
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/api.RegistAndLoginStuct"
}
}
],
"responses": {
"200": {
"description": "{\"success\":true,\"data\":{},\"msg\":\"登陆成功\"}",
"schema": {
"type": "string"
}
}
}
}
},
"/user/regist": {
"post": {
"produces": [
"application/x-www-form-urlencoded"
"application/json"
],
"summary": "创建用户",
"tags": [
"User"
],
"summary": "用户注册账号",
"parameters": [
{
"description": "用户注册接口",
@@ -40,13 +105,13 @@ var doc = `{
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/api.RegistStuct"
"$ref": "#/definitions/api.RegistAndLoginStuct"
}
}
],
"responses": {
"200": {
"description": "{\"code\":200,\"data\":{},\"msg\":\"ok\"}",
"description": "{\"success\":true,\"data\":{},\"msg\":\"注册成功\"}",
"schema": {
"type": "string"
}
@@ -56,7 +121,21 @@ var doc = `{
}
},
"definitions": {
"api.RegistStuct": {
"api.ChangePassWordStutrc": {
"type": "object",
"properties": {
"newPassWord": {
"type": "string"
},
"passWord": {
"type": "string"
},
"userName": {
"type": "string"
}
}
},
"api.RegistAndLoginStuct": {
"type": "object",
"properties": {
"passWord": {

View File

@@ -5,12 +5,77 @@
"license": {}
},
"paths": {
"/user/changePassWord": {
"post": {
"produces": [
"application/json"
],
"tags": [
"User"
],
"summary": "用户修改密码",
"parameters": [
{
"description": "用户修改密码",
"name": "data",
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/api.ChangePassWordStutrc"
}
}
],
"responses": {
"200": {
"description": "{\"success\":true,\"data\":{},\"msg\":\"修改成功\"}",
"schema": {
"type": "string"
}
}
}
}
},
"/user/login": {
"post": {
"produces": [
"application/json"
],
"tags": [
"User"
],
"summary": "用户登录",
"parameters": [
{
"description": "用户登录接口",
"name": "data",
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/api.RegistAndLoginStuct"
}
}
],
"responses": {
"200": {
"description": "{\"success\":true,\"data\":{},\"msg\":\"登陆成功\"}",
"schema": {
"type": "string"
}
}
}
}
},
"/user/regist": {
"post": {
"produces": [
"application/x-www-form-urlencoded"
"application/json"
],
"summary": "创建用户",
"tags": [
"User"
],
"summary": "用户注册账号",
"parameters": [
{
"description": "用户注册接口",
@@ -19,13 +84,13 @@
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/api.RegistStuct"
"$ref": "#/definitions/api.RegistAndLoginStuct"
}
}
],
"responses": {
"200": {
"description": "{\"code\":200,\"data\":{},\"msg\":\"ok\"}",
"description": "{\"success\":true,\"data\":{},\"msg\":\"注册成功\"}",
"schema": {
"type": "string"
}
@@ -35,7 +100,21 @@
}
},
"definitions": {
"api.RegistStuct": {
"api.ChangePassWordStutrc": {
"type": "object",
"properties": {
"newPassWord": {
"type": "string"
},
"passWord": {
"type": "string"
},
"userName": {
"type": "string"
}
}
},
"api.RegistAndLoginStuct": {
"type": "object",
"properties": {
"passWord": {

View File

@@ -1,5 +1,14 @@
definitions:
api.RegistStuct:
api.ChangePassWordStutrc:
properties:
newPassWord:
type: string
passWord:
type: string
userName:
type: string
type: object
api.RegistAndLoginStuct:
properties:
passWord:
type: string
@@ -10,6 +19,46 @@ info:
contact: {}
license: {}
paths:
/user/changePassWord:
post:
parameters:
- description: 用户修改密码
in: body
name: data
required: true
schema:
$ref: '#/definitions/api.ChangePassWordStutrc'
type: object
produces:
- application/json
responses:
"200":
description: '{"success":true,"data":{},"msg":"修改成功"}'
schema:
type: string
summary: 用户修改密码
tags:
- User
/user/login:
post:
parameters:
- description: 用户登录接口
in: body
name: data
required: true
schema:
$ref: '#/definitions/api.RegistAndLoginStuct'
type: object
produces:
- application/json
responses:
"200":
description: '{"success":true,"data":{},"msg":"登陆成功"}'
schema:
type: string
summary: 用户登录
tags:
- User
/user/regist:
post:
parameters:
@@ -18,14 +67,16 @@ paths:
name: data
required: true
schema:
$ref: '#/definitions/api.RegistStuct'
$ref: '#/definitions/api.RegistAndLoginStuct'
type: object
produces:
- application/x-www-form-urlencoded
- application/json
responses:
"200":
description: '{"code":200,"data":{},"msg":"ok"}'
description: '{"success":true,"data":{},"msg":"注册成功"}'
schema:
type: string
summary: 创建用户
summary: 用户注册账号
tags:
- User
swagger: "2.0"