和多雨把数据库的表定下来了,下一步把页面都画出来,把业务逻辑理一理。
主页(登陆后)pc 第三方接入弹框
基础功能:
-
登陆(github第三方)
-
获取用户信息(用户id,昵称,头像,暂不提供修改信息功能)
-
创建谱册(只输入谱册名称,快速创建,后面再补充其他信息,封面为默认图片,默认不公开)
-
谱册列表(谱册名称、封面图片)
-
获取单个谱册信息(谱册名称、简介、封面图片、标签数组、包含的谱子列表)
-
单个谱册信息修改(谱册名称、简介、封面图片、是否公开、标签数组的删除与增加 [ 最多3个标签,可以没有 ])
-
往单个谱册中添加谱子/往收藏夹里添加谱子
-
删除单个谱册中的谱子
-
删除单个谱册
进阶功能:
-
收藏别人的谱册
-
取消收藏别人的谱册
-
收藏谱册列表
- 热门谱册列表(按收藏人数降序列出所有用户的公开谱册:谱册名称、封面图片、被收藏次数、标签数组)
- 最新谱册列表(按创建时间降序列出所有用户的公开谱册:谱册名称、封面图片、创建时间)
{
{
"vid": 1,
"name": "2018年01月新番精选",
"cover": "https://user-images.githubusercontent.com/35213527/35343025-8dbb8604-0164-11e8-9ee9-107ed45359c7.png",
"describe": "I'm having a problem with this.",
"uid": 1,
"label":[
"新番",
"老番"
],
"status":0,
"create_date":@date
},
{
"vid": 1,
"name": "2018年01月新番精选",
"cover": "https://user-images.githubusercontent.com/35213527/35343025-8dbb8604-0164-11e8-9ee9-107ed45359c7.png",
"describe": "I'm having a problem with this.",
"uid": 1,
"label":[
"新番",
"老番"
],
"status":0,
"create_date":@date
},
{
"vid": 1,
"name": "2018年01月新番精选",
"cover": "https://user-images.githubusercontent.com/35213527/35343025-8dbb8604-0164-11e8-9ee9-107ed45359c7.png",
"describe": "I'm having a problem with this.",
"uid": 1,
"label":[
"新番",
"老番"
],
"status":0,
"create_date":@date
}
}
接口
users
- Get an user information(需验证)
GET /users/:uid/info
favorite
-
List scores in a favorite
GET /users/:uid/favorite
-
Add a score to a favorite (需验证)
POST /users/:uid/favorite/scores
-
Delete a score from a favorite (需验证)
DELETE /users/:uid/favorite/scores/:sid
volumes
-
List volumes
GET /volumes
-
List volumes created by a user
GET /users/:uid/volumes
-
Get a single volume
GET /volumes/:vid
-
Create a volume
POST /volumes
-
Edit a volume (需验证)
PATCH /volumes/:vid
-
Delete a volume (需验证)
DELETE /volumes/:vid
-
List scores in a volume
GET /volumes/:vid/scores
-
Add a score to a volume (需验证)
POST /volumes/:vid/scores
-
Delete a score from a volume (需验证)
DELETE /volumes/:vid/scores/:sid
search
- Search volumes
GET /search/volumes
按时间排序
GET /search/volumes?status=1&sort=created&order=desc
GET /search/volumes?label=新番&status=1&sort=created&order=desc
Name | Type | Description |
---|---|---|
label | string | Filter volumes based on their labels. |
status | TINYINT(4) | Filter volumes based on their status. 0:deleted,1:public,2:private,3:reviewed.Default: 1. |
sort | string | The sort field. Can be comments, created. Default: results are sorted by best match. |
order | string | The sort order if sort parameter is provided. One of asc or desc. Default: desc |
网友评论