router.js 1.61 KB
/**
 * router of sub app channel
 * @author: Bi Kai<kai.bi@yoho.cn>
 * @date: 2016/05/09
 */

'use strict';

const express = require('express');
const cRoot = './controllers';
const star = require(cRoot + '/star');
const plusstar = require(cRoot + '/plusstar');
const index = require(cRoot + '/index');
const opt = require(cRoot + '/opt');
const info = require(cRoot + '/info');
const plustar = require(cRoot + '/plustar');

const router = express.Router(); // eslint-disable-line

router.get('/star', star.index); // 星潮教室首页
router.get('/star/getIndexHtml', star.getIndexHtml); // 星潮教室首页
router.get('/star/detail', star.detail); // 明星文章专区
router.get('/star/detailList', star.detailList); // 明星文章专区文章Ajax请求
router.get('/star/special', star.special); // 星潮教室星专题
router.get('/star/collocation', star.collocation); // 星潮教室星搭配
router.get('/star/collocation/list', star.collocationList); // 星潮教室星搭配文章请求

router.post('/star/setFavorite', star.setFavorite); // 收藏文章

router.get('/plusstar', plusstar.index); // 潮流优选
router.get('/plusstar/resources-template', plusstar.resourcesTemplate); // 潮流优选首页-资源位
router.get('/', index.index); // 逛首页

router.get('/author/list', index.editor); // 编辑简介

router.get('/index/page', index.page); // 逛列表页面的资讯分页

router.post('/opt/praiseArticle', opt.praiseArticle); // 资讯文章点赞 (H5里显示点赞)

router.get('/info/index', info.index); // 逛详情页

router.get('/plustar', plustar.getListData); //国际优选

module.exports = router;