-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
959d4fb
commit 91ba3cd
Showing
6 changed files
with
61 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# 私密空间-接口服务 | ||
# 我的隐私空间-接口服务 | ||
|
||
## 教程视频 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
/** | ||
* This file is part of Hyperf. | ||
* | ||
* @link https://www.hyperf.io | ||
* @document https://hyperf.wiki | ||
* @contact [email protected] | ||
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE | ||
*/ | ||
|
||
namespace App\Schema; | ||
|
||
use Hyperf\Swagger\Annotation\Property; | ||
use Hyperf\Swagger\Annotation\Schema; | ||
use JsonSerializable; | ||
|
||
#[Schema(title: '消息数据')] | ||
class MessageSchema implements JsonSerializable | ||
{ | ||
public function __construct( | ||
#[Property(property: 'message', title: '消息内容', type: 'string')] | ||
public string $message | ||
) { | ||
} | ||
|
||
public function jsonSerialize(): mixed | ||
{ | ||
return [ | ||
'message' => $this->message, | ||
]; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
{"openapi":"3.0.0","paths":{"\/content\/save":{"post":{"tags":["内容管理"],"summary":"创建内容","operationId":"a78b24e177cb54b1c1a9855d6f04ba53","requestBody":{"content":{"application\/json":{"schema":{"properties":{"id":{"description":"内容 ID","type":"integer","rules":"required|integer","attribute":null},"secret_id":{"description":"密码 ID","type":"integer","rules":"required|integer","attribute":null},"title":{"description":"标题","type":"string","rules":"required|string","attribute":null},"content":{"description":"内容","type":"string","rules":"required|string","attribute":null},"type":{"description":"类型 0 文本 1 音频 2 视频","type":"integer","rules":"integer","attribute":null}},"type":"object"}}},"_content":{"properties":{"id":{"description":"内容 ID","type":"integer","rules":"required|integer","attribute":null},"secret_id":{"description":"密码 ID","type":"integer","rules":"required|integer","attribute":null},"title":{"description":"标题","type":"string","rules":"required|string","attribute":null},"content":{"description":"内容","type":"string","rules":"required|string","attribute":null},"type":{"description":"类型 0 文本 1 音频 2 视频","type":"integer","rules":"integer","attribute":null}},"type":"object"}},"responses":{"200":{"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/SavedSchema"}}}}}}},"\/content\/list":{"get":{"tags":["内容管理"],"summary":"内容列表","operationId":"18f900c225e9137df5c8f04b5f9cbb0b","requestBody":{"content":{"application\/json":{"schema":{"properties":{"secret_id":{"description":"密码 ID","type":"integer","rules":"required|integer","attribute":null}},"type":"object"}}},"_content":{"properties":{"secret_id":{"description":"密码 ID","type":"integer","rules":"required|integer","attribute":null}},"type":"object"}},"responses":{"200":{"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ContentListSchema"}}}}}}},"\/content\/info":{"get":{"tags":["内容管理"],"summary":"内容详情","operationId":"a8a058393085c920c33af03e92b3e7b1","requestBody":{"content":{"application\/json":{"schema":{"properties":{"id":{"description":"内容 ID","type":"integer","rules":"required|integer","attribute":null}},"type":"object"}}},"_content":{"properties":{"id":{"description":"内容 ID","type":"integer","rules":"required|integer","attribute":null}},"type":"object"}},"responses":{"200":{"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ContentSchema"}}}}}}},"\/login":{"post":{"tags":["注册登录"],"summary":"小程序登录","operationId":"af704524b829a3c6cea821006f70e2b0","requestBody":{"content":{"application\/json":{"schema":{"properties":{"code":{"description":"微信授权码","type":"string","rules":"required|string","attribute":null}},"type":"object"}}},"_content":{"properties":{"code":{"description":"微信授权码","type":"string","rules":"required|string","attribute":null}},"type":"object"}},"responses":{"200":{"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/LoginSchema"}}}}}}},"\/secret\/create":{"post":{"tags":["密码管理"],"summary":"创建密码","operationId":"27217b189e2bb645206816f6fd7bb30d","requestBody":{"content":{"application\/json":{"schema":{"properties":{"secret":{"description":"密码","type":"string","rules":"required|string","attribute":null}},"type":"object"}}},"_content":{"properties":{"secret":{"description":"密码","type":"string","rules":"required|string","attribute":null}},"type":"object"}},"responses":{"200":{"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/SavedSchema"}}}}}}},"\/secret\/check":{"post":{"tags":["密码管理"],"summary":"验证密码","operationId":"d5a3412a21c72fb0ee41e2361d1e91c5","requestBody":{"content":{"application\/json":{"schema":{"properties":{"secret":{"description":"密码","type":"string","rules":"required|string","attribute":null}},"type":"object"}}},"_content":{"properties":{"secret":{"description":"密码","type":"string","rules":"required|string","attribute":null}},"type":"object"}},"responses":{"200":{"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/SecretSchema"}}}}}}},"\/user\/info":{"get":{"tags":["注册登录"],"summary":"用户信息","operationId":"c39dc625b20bc8ec41aeb09f2b7a98a0","responses":{"200":{"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/UserSchema"}}}}}}}},"components":{"schemas":{"ContentListSchema":{"title":"内容列表","properties":{"list":{"title":"列表","type":"array","items":{"$ref":"#\/components\/schemas\/ContentSchema"},"rules":null,"attribute":null},"count":{"title":"总数","type":"integer","rules":null,"attribute":null}},"type":"object"},"ContentSchema":{"title":"内容详情","properties":{"id":{"title":"","type":"integer","rules":null,"attribute":null},"user_id":{"title":"用户 ID","type":"integer","rules":null,"attribute":null},"secret_id":{"title":"密码 ID","type":"integer","rules":null,"attribute":null},"title":{"title":"标题","type":"string","rules":null,"attribute":null},"content":{"title":"内容","type":"string","rules":null,"attribute":null},"type":{"title":"类型 0 文本 1 音频 2 视频","type":"integer","rules":null,"attribute":null},"created_at":{"title":"","type":"mixed","rules":null,"attribute":null},"updated_at":{"title":"","type":"mixed","rules":null,"attribute":null}},"type":"object"},"LoginSchema":{"title":"LoginSchema","properties":{"token":{"title":"Token","type":"string","rules":null,"attribute":null}},"type":"object"},"SavedSchema":{"title":"SavedSchema","properties":{"saved":{"title":"是否保存成功","type":"boolean","rules":null,"attribute":null}},"type":"object"},"SecretSchema":{"title":"密码详情","properties":{"id":{"title":"","type":"integer","rules":null,"attribute":null},"user_id":{"title":"用户 ID","type":"integer","rules":null,"attribute":null},"created_at":{"title":"","type":"mixed","rules":null,"attribute":null},"updated_at":{"title":"","type":"mixed","rules":null,"attribute":null}},"type":"object"},"UserSchema":{"title":"用户详情","properties":{"id":{"title":"","type":"integer","rules":null,"attribute":null},"openid":{"title":"小程序 OpenID","type":"string","rules":null,"attribute":null},"has_secret":{"title":"是否已经创建过密码","type":"boolean","rules":null,"attribute":null},"created_at":{"title":"","type":"string","rules":null,"attribute":null},"updated_at":{"title":"","type":"string","rules":null,"attribute":null}},"type":"object"}}}} | ||
{"openapi":"3.0.0","paths":{"\/content\/save":{"post":{"tags":["内容管理"],"summary":"创建内容","operationId":"a78b24e177cb54b1c1a9855d6f04ba53","requestBody":{"content":{"application\/json":{"schema":{"properties":{"id":{"description":"内容 ID","type":"integer","rules":"required|integer","attribute":null},"secret_id":{"description":"密码 ID","type":"integer","rules":"required|integer","attribute":null},"title":{"description":"标题","type":"string","rules":"required|string","attribute":null},"content":{"description":"内容","type":"string","rules":"required|string","attribute":null},"type":{"description":"类型 0 文本 1 音频 2 视频 3 图片","type":"integer","rules":"integer","attribute":null}},"type":"object"}}},"_content":{"properties":{"id":{"description":"内容 ID","type":"integer","rules":"required|integer","attribute":null},"secret_id":{"description":"密码 ID","type":"integer","rules":"required|integer","attribute":null},"title":{"description":"标题","type":"string","rules":"required|string","attribute":null},"content":{"description":"内容","type":"string","rules":"required|string","attribute":null},"type":{"description":"类型 0 文本 1 音频 2 视频 3 图片","type":"integer","rules":"integer","attribute":null}},"type":"object"}},"responses":{"200":{"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/SavedSchema"}}}}}}},"\/content\/list":{"get":{"tags":["内容管理"],"summary":"内容列表","operationId":"18f900c225e9137df5c8f04b5f9cbb0b","requestBody":{"content":{"application\/json":{"schema":{"properties":{"secret_id":{"description":"密码 ID","type":"integer","rules":"required|integer","attribute":null}},"type":"object"}}},"_content":{"properties":{"secret_id":{"description":"密码 ID","type":"integer","rules":"required|integer","attribute":null}},"type":"object"}},"responses":{"200":{"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ContentListSchema"}}}}}}},"\/content\/info":{"get":{"tags":["内容管理"],"summary":"内容详情","operationId":"a8a058393085c920c33af03e92b3e7b1","requestBody":{"content":{"application\/json":{"schema":{"properties":{"id":{"description":"内容 ID","type":"integer","rules":"required|integer","attribute":null}},"type":"object"}}},"_content":{"properties":{"id":{"description":"内容 ID","type":"integer","rules":"required|integer","attribute":null}},"type":"object"}},"responses":{"200":{"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ContentSchema"}}}}}}},"\/login":{"post":{"tags":["注册登录"],"summary":"小程序登录","operationId":"af704524b829a3c6cea821006f70e2b0","requestBody":{"content":{"application\/json":{"schema":{"properties":{"code":{"description":"微信授权码","type":"string","rules":"required|string","attribute":null}},"type":"object"}}},"_content":{"properties":{"code":{"description":"微信授权码","type":"string","rules":"required|string","attribute":null}},"type":"object"}},"responses":{"200":{"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/LoginSchema"}}}}}}},"\/secret\/create":{"post":{"tags":["密码管理"],"summary":"创建密码","operationId":"27217b189e2bb645206816f6fd7bb30d","requestBody":{"content":{"application\/json":{"schema":{"properties":{"secret":{"description":"密码","type":"string","rules":"required|string","attribute":null}},"type":"object"}}},"_content":{"properties":{"secret":{"description":"密码","type":"string","rules":"required|string","attribute":null}},"type":"object"}},"responses":{"200":{"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/SavedSchema"}}}}}}},"\/secret\/check":{"post":{"tags":["密码管理"],"summary":"验证密码","operationId":"d5a3412a21c72fb0ee41e2361d1e91c5","requestBody":{"content":{"application\/json":{"schema":{"properties":{"secret":{"description":"密码","type":"string","rules":"required|string","attribute":null}},"type":"object"}}},"_content":{"properties":{"secret":{"description":"密码","type":"string","rules":"required|string","attribute":null}},"type":"object"}},"responses":{"200":{"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/SecretSchema"}}}}}}},"\/secret\/message":{"get":{"tags":["密码管理"],"summary":"密码提示","operationId":"f78ffe669ecbf2f55d12dd2c977c6c40","responses":{"200":{"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/MessageSchema"}}}}}}},"\/user\/info":{"get":{"tags":["注册登录"],"summary":"用户信息","operationId":"c39dc625b20bc8ec41aeb09f2b7a98a0","responses":{"200":{"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/UserSchema"}}}}}}}},"components":{"schemas":{"ContentListSchema":{"title":"内容列表","properties":{"list":{"title":"列表","type":"array","items":{"$ref":"#\/components\/schemas\/ContentSchema"},"rules":null,"attribute":null},"count":{"title":"总数","type":"integer","rules":null,"attribute":null}},"type":"object"},"ContentSchema":{"title":"内容详情","properties":{"id":{"title":"","type":"integer","rules":null,"attribute":null},"user_id":{"title":"用户 ID","type":"integer","rules":null,"attribute":null},"secret_id":{"title":"密码 ID","type":"integer","rules":null,"attribute":null},"title":{"title":"标题","type":"string","rules":null,"attribute":null},"content":{"title":"内容","type":"string","rules":null,"attribute":null},"type":{"title":"类型 0 文本 1 音频 2 视频","type":"integer","rules":null,"attribute":null},"created_at":{"title":"","type":"mixed","rules":null,"attribute":null},"updated_at":{"title":"","type":"mixed","rules":null,"attribute":null}},"type":"object"},"LoginSchema":{"title":"LoginSchema","properties":{"token":{"title":"Token","type":"string","rules":null,"attribute":null}},"type":"object"},"MessageSchema":{"title":"消息数据","properties":{"message":{"title":"消息内容","type":"string","rules":null,"attribute":null}},"type":"object"},"SavedSchema":{"title":"SavedSchema","properties":{"saved":{"title":"是否保存成功","type":"boolean","rules":null,"attribute":null}},"type":"object"},"SecretSchema":{"title":"密码详情","properties":{"id":{"title":"","type":"integer","rules":null,"attribute":null},"user_id":{"title":"用户 ID","type":"integer","rules":null,"attribute":null},"created_at":{"title":"","type":"mixed","rules":null,"attribute":null},"updated_at":{"title":"","type":"mixed","rules":null,"attribute":null}},"type":"object"},"UserSchema":{"title":"用户详情","properties":{"id":{"title":"","type":"integer","rules":null,"attribute":null},"openid":{"title":"小程序 OpenID","type":"string","rules":null,"attribute":null},"has_secret":{"title":"是否已经创建过密码","type":"boolean","rules":null,"attribute":null},"created_at":{"title":"","type":"string","rules":null,"attribute":null},"updated_at":{"title":"","type":"string","rules":null,"attribute":null}},"type":"object"}}}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters