Skip to content

Commit 41fe08f

Browse files
author
Bigsk
committed
User Interface Doc for Front
1 parent 5ae3a3a commit 41fe08f

File tree

1 file changed

+103
-5
lines changed

1 file changed

+103
-5
lines changed

document/front_design/README.md

Lines changed: 103 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,11 @@
1818
#### All template use WebApi to deal the operate
1919
#### Recommand Vue.js, but you still can use jQuery(Ajax) :D
2020
#### All Response Code (Int)
21-
##### `10000` `Success`
21+
##### `10000` `Success` `Successfully requested`
22+
##### `20000` `No enough times` `No enough times to song`
23+
##### `30000` `Forbidden` `Wrong Access (For User)`
2224

23-
## Front(User)
25+
## Front (User)
2426

2527
### Index Page
2628
#### The index page use the root path ("/"),
@@ -45,7 +47,7 @@
4547
###### `name` `string` `name of song`
4648
###### `artists` `list` `list of artists`
4749
###### `album` `dict` `album of this song`
48-
###### `url` `string` `the media url of this song`
50+
###### `url` `string` `the media url of this song (source platform or system cache)`
4951
##### List of Artists Args:
5052
###### `id` `int` `artist id(platform)`
5153
###### `name` `string` `name of this artist`
@@ -57,12 +59,108 @@
5759

5860
### History Page
5961
#### The history page use the path "/history"
60-
#### Anybody can directly get history of songs
62+
#### Anybody can directly get the history of songs
6163
#### WebApi Interface Detail:
6264
##### Path: `/api/history`
6365
##### Method: `GET`
6466
##### Args: `Nothing`
6567
##### Response Format: `Json`
6668
##### Json Args:
6769
###### `code` `int` `response code`
68-
###### `content` `list` `list of history songs`
70+
###### `content` `list` `list of history songs`
71+
##### List of Songs Args(content):
72+
###### `pid` `int` `platform id`
73+
###### `id` `int` `song id(platform)`
74+
###### `name` `string` `name of song`
75+
###### `artists` `list` `list of artists`
76+
###### `album` `dict` `album of this song`
77+
###### `url` `string` `the media url of this song (system cache)`
78+
##### List of Artists Args:
79+
###### `id` `int` `artist id(platform)`
80+
###### `name` `string` `name of this artist`
81+
###### `cover` `string` `image url of this aritist`
82+
##### Album Args:
83+
###### `id` `int` `album id(platform)`
84+
###### `name` `string` `name of this album`
85+
###### `cover` `string` `image url of this album`
86+
87+
### List Page
88+
#### The list page use the path "/list"
89+
#### Anybody can directly get the list of whitelist and blacklist
90+
#### WebApi Interface Detail:
91+
##### Path: `/api/list`
92+
##### Method: `GET`
93+
##### Args: `Nothing`
94+
##### Response Format: `Json`
95+
##### Json Args:
96+
###### `code` `int` `response code`
97+
###### `content` `dict` `dict of list, included whitelist and blacklist`
98+
##### Content Dict(content):
99+
###### `white` `list` `songs list of whitelist`
100+
###### `black` `list` `songs list of blacklist`
101+
##### List of Songs Args:
102+
###### `pid` `int` `platform id`
103+
###### `id` `int` `song id(platform)`
104+
###### `name` `string` `name of song`
105+
###### `artists` `list` `list of artists`
106+
###### `album` `dict` `album of this song`
107+
##### List of Artists Args:
108+
###### `id` `int` `artist id(platform)`
109+
###### `name` `string` `name of this artist`
110+
###### `cover` `string` `image url of this aritist`
111+
##### Album Args:
112+
###### `id` `int` `album id(platform)`
113+
###### `name` `string` `name of this album`
114+
###### `cover` `string` `image url of this album`
115+
116+
### Confirm Page
117+
#### The confirm page use the path "/confirm"
118+
#### This page only use for the twice confirm
119+
#### Located from the search page
120+
#### Read the parameter from url on front code (Javascript)
121+
#### Get Parameter:
122+
##### `platform` `int` `platform id`
123+
##### `id` `int` `id of the song`
124+
#### Then use the id and platform id to requests the song detail
125+
#### WebApi Interface Detail:
126+
##### Path: `/api/detail`
127+
##### Method: `POST`
128+
##### Args:
129+
###### `platform` `int` `id of the platform`
130+
###### `id` `int` `id of the song`
131+
###### `token` `string` `user token`
132+
##### Response Format: `Json`
133+
##### Json Args:
134+
###### `code` `int` `response code`
135+
###### `content` `list` `list of songs`
136+
##### List of Songs Args(content):
137+
###### `pid` `int` `platform id`
138+
###### `id` `int` `song id(platform)`
139+
###### `name` `string` `name of song`
140+
###### `artists` `list` `list of artists`
141+
###### `album` `dict` `album of this song`
142+
###### `url` `string` `the media url of this song (source platform or system cache)`
143+
##### List of Artists Args:
144+
###### `id` `int` `artist id(platform)`
145+
###### `name` `string` `name of this artist`
146+
###### `cover` `string` `image url of this aritist`
147+
##### Album Args:
148+
###### `id` `int` `album id(platform)`
149+
###### `name` `string` `name of this album`
150+
###### `cover` `string` `image url of this album`
151+
#### After user clicking the confirm button, send request to this interface
152+
#### WebApi Interface Detail:
153+
##### Path: `/api/detail`
154+
##### Method: `POST`
155+
##### Args:
156+
###### `platform` `int` `id of the platform`
157+
###### `id` `int` `id of the song`
158+
###### `date` `string` `YYYY-MM-DD`
159+
###### `token` `string` `user token`
160+
##### Response Format: `Json`
161+
##### Json Args:
162+
###### `code` `int` `response code`
163+
164+
## Back (Admin)
165+
166+
### Access Page

0 commit comments

Comments
 (0)