Blame view

apps/3party/router.js 1.48 KB
htoooth authored
1
/**
htoooth authored
2
 * router of sub app 3party
htoooth authored
3 4 5 6 7 8 9 10 11
 * @author: htoooth<ht.anglenx@gmail.com>
 * @date: 2016/11/08
 */

'use strict';

const router = require('express').Router();  // eslint-disable-line
const cRoot = './controllers';
姜枫 authored
12
const auth = require(`${global.middleware}/auth`);
htoooth authored
13
const captcha = require('../passport/controllers/captcha');
姜枫 authored
14
htoooth authored
15
const ads = require(`${cRoot}/ads`); // 第三方广告平台对接
htoooth authored
16
const robot = require(`${cRoot}/robot-check`);  // 机器人检查
姜枫 authored
17
const materialController = require(`${cRoot}/material`);
王水玲 authored
18
const activate = require(`${cRoot}/activate`); // 激活点击统计
OF1706 authored
19
const questionnaire = require(`${cRoot}/questionnaire`);
htoooth authored
20
htoooth authored
21
router.get('/ads', ads.jump);
htoooth authored
22
router.get('/check', captcha.geeOnly, robot.index);
htoooth authored
23
router.post('/check', robot.check, robot.isHuman);
htoooth authored
24
router.get('/captcha.png', robot.img);
htoooth authored
25
yyq authored
26 27
router.get('/material', auth, materialController.indexNew);
router.get('/material/old', auth, materialController.index);
姜枫 authored
28 29
router.get('/material/newBrandList', auth, materialController.newBrandList);
router.get('/material/getCategory', auth, materialController.getCategory);
王水玲 authored
30 31
router.get('/material/getList', auth, materialController.getList);
router.get('/material/getRecommendlist', auth, materialController.getRecommendlist);
姜枫 authored
32
王水玲 authored
33 34
router.get('/activate-count', auth, activate.index);
router.get('/activate-count/getList', auth, activate.getList);
htoooth authored
35
router.get('/questionnaire/:id', questionnaire.getQuestionnaire);
yyq authored
36
router.get('/questionnaire', auth, questionnaire.getQuestionList);
htoooth authored
37
module.exports = router;