feat: phone validation
Some checks failed
build quyun / Build (push) Failing after 1m25s

This commit is contained in:
2025-12-20 11:47:45 +08:00
parent fdbf26d751
commit 0e4af79b53
31 changed files with 1130 additions and 984 deletions

View File

@@ -57,7 +57,7 @@ definitions:
type: integer
medias:
items:
$ref: '#/definitions/models.Media'
$ref: '#/definitions/models.Medium'
type: array
price:
type: integer
@@ -220,7 +220,7 @@ definitions:
username:
type: string
type: object
models.Media:
models.Medium:
properties:
created_at:
type: string
@@ -229,7 +229,9 @@ definitions:
id:
type: integer
metas:
$ref: '#/definitions/types.JSONType-fields_MediaMetas'
items:
type: integer
type: array
mime_type:
type: string
name:
@@ -290,6 +292,8 @@ definitions:
$ref: '#/definitions/types.JSONType-fields_UserMetas'
open_id:
type: string
phone:
type: string
status:
$ref: '#/definitions/fields.UserStatus'
updated_at:
@@ -363,8 +367,6 @@ definitions:
type: object
types.JSONType-array_string:
type: object
types.JSONType-fields_MediaMetas:
type: object
types.JSONType-fields_OrderMeta:
type: object
types.JSONType-fields_UserAuthToken:
@@ -448,7 +450,7 @@ paths:
- $ref: '#/definitions/requests.Pager'
- properties:
items:
$ref: '#/definitions/models.Media'
$ref: '#/definitions/models.Medium'
type: object
summary: 媒体列表
tags:
@@ -828,102 +830,8 @@ paths:
summary: 调整用户余额
tags:
- Admin Users
/posts:
get:
parameters:
- in: query
name: limit
type: integer
- in: query
name: page
type: integer
- in: query
name: keyword
type: string
produces:
- application/json
responses:
"200":
description: 成功
schema:
allOf:
- $ref: '#/definitions/requests.Pager'
- properties:
items:
$ref: '#/definitions/http.PostItem'
type: object
summary: 作品列表
tags:
- Posts
/posts/{id}/buy:
/v1/auth/{phone}:
post:
parameters:
- description: 作品 ID
format: int64
in: path
name: id
required: true
type: integer
produces:
- application/json
responses:
"200":
description: 成功(余额支付返回 AppId=balance
schema:
$ref: '#/definitions/wechat.JSAPIPayParams'
summary: 购买作品
tags:
- Posts
/posts/{id}/play:
get:
parameters:
- description: 作品 ID
format: int64
in: path
name: id
required: true
type: integer
produces:
- application/json
responses:
"200":
description: 成功
schema:
$ref: '#/definitions/http.PlayUrl'
summary: 获取播放地址
tags:
- Posts
/posts/{id}/show:
get:
parameters:
- description: 作品 ID
format: int64
in: path
name: id
required: true
type: integer
produces:
- application/json
responses:
"200":
description: 成功
schema:
$ref: '#/definitions/http.PostItem'
summary: 作品详情
tags:
- Posts
/posts/mine:
get:
parameters:
- in: query
name: limit
type: integer
- in: query
name: page
type: integer
- in: query
name: keyword
type: string
produces:
- application/json
responses:
@@ -936,41 +844,9 @@ paths:
items:
$ref: '#/definitions/http.PostItem'
type: object
summary: 我的已购作品
summary: 手机验证
tags:
- Posts
/users/profile:
get:
produces:
- application/json
responses:
"200":
description: 成功
schema:
$ref: '#/definitions/http.UserInfo'
summary: 获取个人信息
tags:
- Users
/users/username:
put:
consumes:
- application/json
parameters:
- description: 请求体
in: body
name: form
required: true
schema:
$ref: '#/definitions/http.ProfileForm'
produces:
- application/json
responses:
"200":
description: 成功
schema: {}
summary: 修改用户名
tags:
- Users
- Auth
/v1/medias/{id}:
post:
consumes:
@@ -1019,6 +895,149 @@ paths:
summary: 演示接口
tags:
- Demo
/v1/posts:
get:
parameters:
- in: query
name: limit
type: integer
- in: query
name: page
type: integer
- in: query
name: keyword
type: string
produces:
- application/json
responses:
"200":
description: 成功
schema:
allOf:
- $ref: '#/definitions/requests.Pager'
- properties:
items:
$ref: '#/definitions/http.PostItem'
type: object
summary: 作品列表
tags:
- Posts
/v1/posts/{id}/buy:
post:
parameters:
- description: 作品 ID
format: int64
in: path
name: id
required: true
type: integer
produces:
- application/json
responses:
"200":
description: 成功(余额支付返回 AppId=balance
schema:
$ref: '#/definitions/wechat.JSAPIPayParams'
summary: 购买作品
tags:
- Posts
/v1/posts/{id}/play:
get:
parameters:
- description: 作品 ID
format: int64
in: path
name: id
required: true
type: integer
produces:
- application/json
responses:
"200":
description: 成功
schema:
$ref: '#/definitions/http.PlayUrl'
summary: 获取播放地址
tags:
- Posts
/v1/posts/{id}/show:
get:
parameters:
- description: 作品 ID
format: int64
in: path
name: id
required: true
type: integer
produces:
- application/json
responses:
"200":
description: 成功
schema:
$ref: '#/definitions/http.PostItem'
summary: 作品详情
tags:
- Posts
/v1/posts/mine:
get:
parameters:
- in: query
name: limit
type: integer
- in: query
name: page
type: integer
- in: query
name: keyword
type: string
produces:
- application/json
responses:
"200":
description: 成功
schema:
allOf:
- $ref: '#/definitions/requests.Pager'
- properties:
items:
$ref: '#/definitions/http.PostItem'
type: object
summary: 我的已购作品
tags:
- Posts
/v1/users/profile:
get:
produces:
- application/json
responses:
"200":
description: 成功
schema:
$ref: '#/definitions/http.UserInfo'
summary: 获取个人信息
tags:
- Users
/v1/users/username:
put:
consumes:
- application/json
parameters:
- description: 请求体
in: body
name: form
required: true
schema:
$ref: '#/definitions/http.ProfileForm'
produces:
- application/json
responses:
"200":
description: 成功
schema: {}
summary: 修改用户名
tags:
- Users
securityDefinitions:
BasicAuth:
type: basic