router.js
1.49 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
/**
* router of sub app 3party
* @author: htoooth<ht.anglenx@gmail.com>
* @date: 2016/11/08
*/
'use strict';
const router = require('express').Router(); // eslint-disable-line
const cRoot = './controllers';
const auth = require(`${global.middleware}/auth`);
const captcha = require('../passport/controllers/captcha');
const ads = require(`${cRoot}/ads`); // 第三方广告平台对接
const robot = require(`${cRoot}/robot-check`); // 机器人检查
const materialController = require(`${cRoot}/material`);
const activate = require(`${cRoot}/activate`); // 激活点击统计
const questionnaire = require(`${cRoot}/questionnaire`);
router.get('/ads', ads.jump);
router.get('/check', captcha.geetestOnly, robot.index);
router.post('/check', robot.check, robot.isHuman);
router.get('/captcha.png', robot.img);
router.get('/material', auth, materialController.indexNew);
router.get('/material/old', auth, materialController.index);
router.get('/material/newBrandList', auth, materialController.newBrandList);
router.get('/material/getCategory', auth, materialController.getCategory);
router.get('/material/getList', auth, materialController.getList);
router.get('/material/getRecommendlist', auth, materialController.getRecommendlist);
router.get('/activate-count', auth, activate.index);
router.get('/activate-count/getList', auth, activate.getList);
router.get('/questionnaire/:id', questionnaire.getQuestionnaire);
router.get('/questionnaire', auth, questionnaire.getQuestionList);
module.exports = router;