-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathroutes.js
81 lines (79 loc) · 2.2 KB
/
routes.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
import login from './views/user/login-component.js';
import adminlogin from './views/admin/login-component.js';
import adminHomeComponent from './views/admin/home-component.js';
import subjectComponent from './views/admin/subject-component.js';
import loginconfirm from './views/user/loginconfirm-component.js';
import home from './views/user/home-component.js';
import { subjectlist, settings, students, newSubject } from './views/admin/templates.js';
import previewComponent from './views/admin/preview-component.js';
import backup from './views/admin/backup.js';
export const routes = [
{
path : '/',
redirect : '/app/user/login',
children : [
{
path : 'app',
redirect : '/app/user/login',
},
{
path : 'app/user',
redirect : '/app/user/login',
}
]
},
{
path : '/app/user/login',
component : login,
},
{
path : '/app/user/exam',
component : home
},
{
path : '/app/user/login/confirm',
component : loginconfirm,
},
{
path : '/app/admin/login',
component : adminlogin,
},
{
path : '/app/admin',
component : adminHomeComponent,
children : [
{
path : '',
props : true,
component : subjectlist,
},
{
path : 'settings',
props : true,
component : settings,
},
{
path : 'students',
props : true,
component : students,
},
{
path : 'newsubject',
props : true,
component : newSubject,
}
]
},
{
path : '/app/admin/subjects/:subject',
component : subjectComponent,
},
{
path : '/app/admin/questions/preview',
component : previewComponent,
},
{
path : '/app/admin/backup/db',
component : backup,
},
];