Authored by 郝肖肖

潮流优选 控制器

  1 +/**
  2 + * 潮流优选
  3 + * @author: xiaoxiao<xiaoxiao.hao@yoho.cn>
  4 + * @date: 2016/08/04
  5 + */
  6 +'use strict';
  7 +
  8 +const mRoot = '../models';
  9 +const _ = require('lodash');
  10 +const plusstarModel = require(`${mRoot}/plusstar`);
  11 +
  12 +/**
  13 + * 潮流优选首页
  14 + */
  15 +let index = (req, res) => {
  16 + res.render('plusstar/index', {
  17 + module: 'plusstar',
  18 + page: 'index',
  19 + title: '潮流优选'
  20 + });
  21 +};
  22 +
  23 +module.exports = {
  24 + index
  25 +};
  1 +'use strict';
  2 +const api = global.yoho.API;
  3 +const camelCase = global.yoho.camelCase;
  4 +const _ = require('lodash');
  5 +
  6 +/**
  7 + * 获取分享页面列表数据
  8 + * @param {[int]} uid 用户id
  9 + * @param {[int]} activityId 活动id
  10 + * @return {[array]}
  11 + */
  12 +const index = (params) => {
  13 + params = params || {};
  14 +
  15 + return api.get('', Object.assign({
  16 + method: 'wap.invite.index'
  17 + }, params)).then((result) => {
  18 + return Object.assign(camelCase(result));
  19 + });
  20 +};
  21 +
  22 +module.exports = {
  23 + index
  24 +};
@@ -9,6 +9,7 @@ @@ -9,6 +9,7 @@
9 const express = require('express'); 9 const express = require('express');
10 const cRoot = './controllers'; 10 const cRoot = './controllers';
11 const star = require(cRoot + '/star'); 11 const star = require(cRoot + '/star');
  12 +const plusstar = require(cRoot + '/plusstar');
12 13
13 const router = express.Router(); // eslint-disable-line 14 const router = express.Router(); // eslint-disable-line
14 15
@@ -22,4 +23,6 @@ router.get('/star/collocation/list', star.collocationList); // 星潮教室星æ @@ -22,4 +23,6 @@ router.get('/star/collocation/list', star.collocationList); // 星潮教室星æ
22 23
23 router.post('/star/setFavorite', star.setFavorite); // 收藏文章 24 router.post('/star/setFavorite', star.setFavorite); // 收藏文章
24 25
  26 +router.get('/plusstar', plusstar.index); // 潮流优选
  27 +
25 module.exports = router; 28 module.exports = router;