router.js
2.44 KB
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
/**
* 管理员router
* @author: leo <qi.li@yoho.cn>
* @date: 23/06/2017
*/
const express = require('express');
const router = express.Router(); // eslint-disable-line
const admin = require('./controllers/admin');
const activity = require('./controllers/activity');
const user = require('./controllers/user');
// 管理员[page]
router.get('/login', admin.loginPage);
// 活动管理[page]
router.get('/activity/list', activity.activityListPage);
router.get('/activity/create', activity.createActivityPage);
router.get('/activity/article', activity.actArticleListPage);
router.get('/activity/createArticle', activity.createArticlePage);
router.get('/activity/createY100Article', activity.createY100ArticlePage);
router.get('/activity/y100Article', activity.actY100ArticleListPage);
// 用户管理[page]
router.get('/user/list', user.userListPage);
router.get('/user/users_list', user.usersListPage);
router.get('/user/prize_users_list', user.prizeUsersListPage);
// 用户登录日志[page]
router.get('/user/login-log', user.userLoginLog);
router.get('/user/exportUserLoginLog', user.exportUserLoginLog);
// 管理员[ajax]
router.post('/api/login', admin.login);
router.post('/api/logout', admin.logout);
// 活动管理[ajax]
router.post('/api/activity/list', activity.activityList);
router.post('/api/activity/create', activity.createActivity);
router.post('/api/activity/delete', activity.deleteActivity);
router.get('/api/activity/article', activity.actArticleList);
router.get('/api/activity/y100Article', activity.actY100ArticleList);
router.post('/api/activity/deleteArticle', activity.deleteArticle);
router.post('/api/activity/modifyArticle', activity.modifyArticle);
router.get('/api/activity/exportArticleList', activity.exportArticleList);
router.post('/api/activity/createArticle', activity.createArticle);
router.post('/api/activity/createY100Article', activity.createY100Article);
// 用户管理[ajax]
router.post('/api/user/delete', user.deleteUser);
router.post('/api/user/deleteInfoUser', user.deleteInfoUsers);
router.post('/api/user/deletePrizeUser', user.deletePrizeUsers);
router.get('/api/user/list', user.userList);
router.get('/api/user/users_list', user.usersList);
router.get('/api/user/prize_users_list', user.prizeUsersList);
router.get('/api/user/exportUserList', user.exportUserList);
router.get('/api/user/exportPrizeUserList', user.exportPrizeUserList);
router.get('/api/user/exportInfoUserList', user.exportInfoUserList);
module.exports = router;