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

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