135 lines
3.3 KiB
Markdown
135 lines
3.3 KiB
Markdown
# Category
|
|
|
|
CMS - 分类
|
|
|
|
- [/cms.Category/Fetch](#cmscategoryfetch)
|
|
- [/cms.Category/Create](#cmscategorycreate)
|
|
- [/cms.Category/Modify](#cmscategorymodify)
|
|
- [/cms.Category/Delete](#cmscategorydelete)
|
|
|
|
## /cms.Category/Fetch
|
|
|
|
分类列表
|
|
|
|
|
|
### Request
|
|
```javascript
|
|
{
|
|
id: "0", // type<int64>, 唯一ID
|
|
identity: "", // type<string>, 唯一标识
|
|
}
|
|
```
|
|
|
|
### Reply
|
|
```javascript
|
|
{
|
|
// 数据
|
|
data: [{
|
|
id: "0", // type<int64>
|
|
identity: "", // type<string>, 唯一标识
|
|
parent_id: "0", // type<int64>, 为空表示顶级分类
|
|
title: "", // type<string>, 标题
|
|
cover_path: "", // type<string>, 封面图片
|
|
intro: "", // type<string>, 简介
|
|
created_at: "", // type<string>, 创建时间
|
|
updated_at: "", // type<string>, 更新时间
|
|
child: [{}], // list<CategoryItem>, 子集
|
|
category_key: "", // type<string>, 分类标识
|
|
}], // list<CategoryItem>
|
|
// 总数
|
|
count: "0", // type<int64>
|
|
}
|
|
```
|
|
## /cms.Category/Create
|
|
|
|
添加分类
|
|
|
|
|
|
### Request
|
|
```javascript
|
|
{
|
|
id: "0", // type<int64>
|
|
identity: "", // type<string>, 唯一标识
|
|
parent_id: "0", // type<int64>, 为空表示顶级分类
|
|
title: "", // type<string>, 标题
|
|
cover_path: "", // type<string>, 封面图片
|
|
intro: "", // type<string>, 简介
|
|
created_at: "", // type<string>, 创建时间
|
|
updated_at: "", // type<string>, 更新时间
|
|
child: [{}], // list<CategoryItem>, 子集
|
|
category_key: "", // type<string>, 分类标识
|
|
}
|
|
```
|
|
|
|
### Reply
|
|
```javascript
|
|
{
|
|
code: 0, // type<int32>, 状态码
|
|
message: "", // type<string>, 状态说明
|
|
details: "", // type<string>, 数据
|
|
timeseq: "0", // type<int64>, 响应时间序列
|
|
}
|
|
```
|
|
## /cms.Category/Modify
|
|
|
|
修改分类
|
|
|
|
|
|
### Request
|
|
```javascript
|
|
{
|
|
identity: "", // type<string>, 修改分类请求唯一标识
|
|
parent_id: "0", // type<int64>, 为空表示顶级分类
|
|
title: "", // type<string>, 标题
|
|
cover_path: "", // type<string>, 封面图片
|
|
intro: "", // type<string>, 简介
|
|
created_at: "", // type<string>, 创建时间
|
|
updated_at: "", // type<string>, 更新时间
|
|
data: [{
|
|
id: "0", // type<int64>
|
|
identity: "", // type<string>, 唯一标识
|
|
parent_id: "0", // type<int64>, 为空表示顶级分类
|
|
title: "", // type<string>, 标题
|
|
cover_path: "", // type<string>, 封面图片
|
|
intro: "", // type<string>, 简介
|
|
created_at: "", // type<string>, 创建时间
|
|
updated_at: "", // type<string>, 更新时间
|
|
child: [{}], // list<CategoryItem>, 子集
|
|
category_key: "", // type<string>, 分类标识
|
|
}], // list<CategoryItem>, 子集
|
|
category_key: "", // type<string>, 分类标识
|
|
}
|
|
```
|
|
|
|
### Reply
|
|
```javascript
|
|
{
|
|
code: 0, // type<int32>, 状态码
|
|
message: "", // type<string>, 状态说明
|
|
details: "", // type<string>, 数据
|
|
timeseq: "0", // type<int64>, 响应时间序列
|
|
}
|
|
```
|
|
## /cms.Category/Delete
|
|
|
|
删除分类
|
|
|
|
|
|
### Request
|
|
```javascript
|
|
{
|
|
identity: "", // type<string>, 删除分类请求唯一标识
|
|
}
|
|
```
|
|
|
|
### Reply
|
|
```javascript
|
|
{
|
|
code: 0, // type<int32>, 状态码
|
|
message: "", // type<string>, 状态说明
|
|
details: "", // type<string>, 数据
|
|
timeseq: "0", // type<int64>, 响应时间序列
|
|
}
|
|
```
|
|
|