Skip to content

Commit 5ae3a3a

Browse files
committed
Document Backup Update
1 parent 95cfc18 commit 5ae3a3a

34 files changed

+145
-0
lines changed

document/front_design/README.md

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# Front Design For GeSong System
2+
3+
## Content
4+
### Before
5+
### Front(User)
6+
#### 1. Index Page
7+
#### 2. Search Page
8+
#### 3. History Page
9+
#### 4. List Page
10+
#### 5. Confirm Page
11+
### Back(Admin)
12+
#### 1. Access Page
13+
#### 2. Audit Page
14+
#### 3. List Page
15+
#### 4. System Page
16+
17+
## Before
18+
#### All template use WebApi to deal the operate
19+
#### Recommand Vue.js, but you still can use jQuery(Ajax) :D
20+
#### All Response Code (Int)
21+
##### `10000` `Success`
22+
23+
## Front(User)
24+
25+
### Index Page
26+
#### The index page use the root path ("/"),
27+
#### Server will response a 301 code to jump to search page ("/search")
28+
29+
### Search Page
30+
#### The search page use the path "/search"
31+
#### A user have to log in to use the search function
32+
#### WebApi Interface Detail:
33+
##### Path: `/api/search`
34+
##### Method: `POST`
35+
##### Args:
36+
###### `keyword` `string` `keyword of the song`
37+
###### `token` `string` `user token`
38+
##### Response Format: `Json`
39+
##### Json Args:
40+
###### `code` `int` `response code`
41+
###### `content` `list` `list of songs`
42+
##### List of Songs Args(content):
43+
###### `pid` `int` `platform id`
44+
###### `id` `int` `song id(platform)`
45+
###### `name` `string` `name of song`
46+
###### `artists` `list` `list of artists`
47+
###### `album` `dict` `album of this song`
48+
###### `url` `string` `the media url of this song`
49+
##### List of Artists Args:
50+
###### `id` `int` `artist id(platform)`
51+
###### `name` `string` `name of this artist`
52+
###### `cover` `string` `image url of this aritist`
53+
##### Album Args:
54+
###### `id` `int` `album id(platform)`
55+
###### `name` `string` `name of this album`
56+
###### `cover` `string` `image url of this album`
57+
58+
### History Page
59+
#### The history page use the path "/history"
60+
#### Anybody can directly get history of songs
61+
#### WebApi Interface Detail:
62+
##### Path: `/api/history`
63+
##### Method: `GET`
64+
##### Args: `Nothing`
65+
##### Response Format: `Json`
66+
##### Json Args:
67+
###### `code` `int` `response code`
68+
###### `content` `list` `list of history songs`

gesong/__init__.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
'''
2+
Copyright Ghink Network Studio © 2014
3+
MIT Fengming High School Techy Group & Radio Station
4+
Website: https://www.ghink.net, https://radio.fmhs.club, https://techy.fmhs.club
5+
Main Program by Bigsk (https://www.xiaxinzhe.cn)
6+
'''
7+
8+
from flask import Flask
9+
10+
APP = Flask("GeSong System")

gesong/__main__.py

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
'''
2+
Copyright Ghink Network Studio © 2014
3+
MIT Fengming High School Techy Group & Radio Station
4+
Website: https://www.ghink.net, https://radio.fmhs.club, https://techy.fmhs.club
5+
Main Program by Bigsk (https://www.xiaxinzhe.cn)
6+
'''
7+
8+
from __init__ import *
9+
10+
import route
11+
12+
import os, json
13+
from threading import Thread
14+
from flask import Flask
15+
from urllib.request import urlopen
16+
17+
# Define network check function
18+
def network(source = r"http://www.baidu.com", retry = 3):
19+
flag = False
20+
for _ in range(retry):
21+
try:
22+
fp = urlopen(source)
23+
fp.read(100).decode()
24+
fp.close()
25+
except:
26+
pass
27+
else:
28+
flag = True
29+
return flag
30+
# Define json check function
31+
def check_json(content):
32+
try:
33+
json.loads(content)
34+
except:
35+
return False
36+
else:
37+
return True
38+
finally:
39+
return False
40+
# Define main function
41+
def main():
42+
APP.run("127.0.0.1", 8000)
43+
44+
if __name__ == "__main__":
45+
main()
431 Bytes
Binary file not shown.
1.19 KB
Binary file not shown.
708 Bytes
Binary file not shown.
320 Bytes
Binary file not shown.

gesong/admin/__init__.py

Whitespace-only changes.

gesong/admin/access.py

Whitespace-only changes.

gesong/admin/audit.py

Whitespace-only changes.

0 commit comments

Comments
 (0)