- Summery
- Logic
- RESTful API
- Router
- Usage
完成度 10% ...
采用Nodejs + Express + Vue + Mongodb, 页面使用Bootstrp栅格式设计, MD风格:
| Empty | superadmin(0) | majoradmin(1) | courseadmin(2) | student(3) | unregist(4) | |:-----:|:-------------:|:-------------:|:---------------:|:-----------:|:-----------:| | login | | | | | |
| dir | (method) 'path' / [description] | min_access |
-^index (get)'www/index' <5
-^login (get)'www/login' <5
-fn_login (post)[name pass verify] <5
-fn_forget [] <5
-^forget (get)'www/forget' <5
-fn_forgetSend (get)'www/forget/id' <4
-^register (get)'www/register' <5
-fn_register (post)[id name email pass confirmPass verify] <5
-^admin (get)'www/admin/' <5
-fn_exit (get)[confirm] <3
-^major (get)'www/admin/major/id' <2 && majorid
-fn_majorSet (post/update/delete)[majorid majorname majoradminid (label)delete (tag)add] <1
-fn_majorCourseSet (post/update/delete)[courseid (label)delete (tag)add] <2 && majorid
-fn_majorStudentSet (post/update/delete)[name number email major grade otherinfo{age..}] <2 && majorid
-fn_majorScoreAnalysis (post)[query:] <2 && majorid
-^course (get)'www/admin/course/id' <3 && courseid
-fn_courseSet (post/update/delete)[courseid coursename courseadminid (menu)delete] <3 && courseid
-fn_scoreSet (post/update/delete)[studentid studentname required] <3 && courseid
-fn_scoreAnalysis (post)[query:] <3 && course
-^person (get)'www/admin/person/'
-fn_usersList (menu)[sublist] <2
-fn_superadminSet (update)[superadminname pass email] <1
-fn_majoradminSet (post/update/delete)[teacherid studentname pass email regist] <1
-fn_courseadminSet (post/update/delete)[teacherid studentname pass email regist] <2
-fn_studentSet (post/update/delete)[studentid studentname pass email major regist] <2
-^users (get)'www/users/id' <4
-fn_exit (get)[confirm] <4
-fn_usersSet (update)[logo name pass email] <4
-fn_scoreGet (post)[(choice/tag)date | (choice/tag)require | (choice/tag)range] =3
var users = { "id" : idnum, "name" : username, "pass" : password, "email" : email@xxx.com, "major1" : major1name, "major2" : major2name, "logo" : logo.png, "power" : [0:superadmin 1:majoradmin 2:courseadmin 3:student 4:unregist] 对于教师, 需不需要说明其所属专业或课程,貌似不需要,如果需要,该怎么办 }
var major = { "id" : idnum, "name" : majorname, "adminer" : majoradminid, "course" : [Array类型], "logo" : logo.png }
var course = { "id" : idnum "name" : coursename "teacher" : teacherid "logo" : logo.png }
var score = { "id" : scoreid, "course" : corusename[按教材算,比如高数分为高数一,高数二], "student" : studentid, "teacherid" : teacherid, "teachername" : teachername, "range" : nice/good/ok/die, "required" : yes/no, "date" : [20xx-上|20xx-下] }
Test:
Test:
Test:
Test:
- "/" : index (get/post)
- "/index" : index (get/post)
- "/login" : login (get/post)
- "/forget" : forget (get)
- "/forget/id" : (get)
- "/register" : register (get/post)
- "/admin/major/id" : admin (get/post/update/delete)
- "/admin/course/id" : admin (get/post/update/delete)
- "/admin/person" : admin (get/post/update/delete)
- "/users/id" : users (get/update/post)
确保服务器上已安装Git,Node,MongoDB.
-
git clone xxx.git
-
cd rootdir
-
node bin/www
-
then open the chrome and type in 127.0.0.1/3000