feat: phone validate

This commit is contained in:
2025-12-20 12:56:06 +08:00
parent 22e288bf98
commit dbeb0a5733
19 changed files with 397 additions and 89 deletions

View File

@@ -707,6 +707,17 @@ const docTemplate = `{
"Auth"
],
"summary": "手机验证",
"parameters": [
{
"description": "手机号",
"name": "form",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/http.PhoneValidationForm"
}
}
],
"responses": {
"200": {
"description": "成功",
@@ -724,6 +735,17 @@ const docTemplate = `{
"Auth"
],
"summary": "手机验证",
"parameters": [
{
"description": "请求体",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/http.PhoneValidationForm"
}
}
],
"responses": {
"200": {
"description": "成功",
@@ -1283,6 +1305,17 @@ const docTemplate = `{
}
}
},
"http.PhoneValidationForm": {
"type": "object",
"properties": {
"code": {
"type": "string"
},
"phone": {
"type": "string"
}
}
},
"http.PlayUrl": {
"type": "object",
"properties": {

View File

@@ -701,6 +701,17 @@
"Auth"
],
"summary": "手机验证",
"parameters": [
{
"description": "手机号",
"name": "form",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/http.PhoneValidationForm"
}
}
],
"responses": {
"200": {
"description": "成功",
@@ -718,6 +729,17 @@
"Auth"
],
"summary": "手机验证",
"parameters": [
{
"description": "请求体",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/http.PhoneValidationForm"
}
}
],
"responses": {
"200": {
"description": "成功",
@@ -1277,6 +1299,17 @@
}
}
},
"http.PhoneValidationForm": {
"type": "object",
"properties": {
"code": {
"type": "string"
},
"phone": {
"type": "string"
}
}
},
"http.PlayUrl": {
"type": "object",
"properties": {

View File

@@ -164,6 +164,13 @@ definitions:
description: Valid is true if Time is not NULL
type: boolean
type: object
http.PhoneValidationForm:
properties:
code:
type: string
phone:
type: string
type: object
http.PlayUrl:
properties:
url:
@@ -832,6 +839,13 @@ paths:
- Admin Users
/v1/auth/phone:
post:
parameters:
- description: 手机号
in: body
name: form
required: true
schema:
$ref: '#/definitions/http.PhoneValidationForm'
produces:
- application/json
responses:
@@ -843,6 +857,13 @@ paths:
- Auth
/v1/auth/validate:
post:
parameters:
- description: 请求体
in: body
name: body
required: true
schema:
$ref: '#/definitions/http.PhoneValidationForm'
produces:
- application/json
responses: