Authored by 郝肖肖

潮流优选 控制器

/**
* 潮流优选
* @author: xiaoxiao<xiaoxiao.hao@yoho.cn>
* @date: 2016/08/04
*/
'use strict';
const mRoot = '../models';
const _ = require('lodash');
const plusstarModel = require(`${mRoot}/plusstar`);
/**
* 潮流优选首页
*/
let index = (req, res) => {
res.render('plusstar/index', {
module: 'plusstar',
page: 'index',
title: '潮流优选'
});
};
module.exports = {
index
};
... ...
'use strict';
const api = global.yoho.API;
const camelCase = global.yoho.camelCase;
const _ = require('lodash');
/**
* 获取分享页面列表数据
* @param {[int]} uid 用户id
* @param {[int]} activityId 活动id
* @return {[array]}
*/
const index = (params) => {
params = params || {};
return api.get('', Object.assign({
method: 'wap.invite.index'
}, params)).then((result) => {
return Object.assign(camelCase(result));
});
};
module.exports = {
index
};
... ...
... ... @@ -9,6 +9,7 @@
const express = require('express');
const cRoot = './controllers';
const star = require(cRoot + '/star');
const plusstar = require(cRoot + '/plusstar');
const router = express.Router(); // eslint-disable-line
... ... @@ -22,4 +23,6 @@ router.get('/star/collocation/list', star.collocationList); // 星潮教室星æ
router.post('/star/setFavorite', star.setFavorite); // 收藏文章
router.get('/plusstar', plusstar.index); // 潮流优选
module.exports = router;
... ...
4444444444444t666
\ No newline at end of file
... ...