outlet.js 779 Bytes
/**
 * 频道页面
 * @author: Bi Kai<kai.bi@yoho.cn>
 * @date: 2016/05/09
 */
'use strict';

// const library = '../../../library';

// const _ = require('lodash');
const outletModel = require('../models/outlet');

// const helpers = require(`${library}/helpers`);
// const log = require(`${library}/logger`);

const renderData = {
    module: 'outlet',
    page: 'home'
};

// const outletLogger = (err, res) => {
//     log.error('奥莱页面渲染错误:' + JSON.stringify(err));
//     res.send('error');
// };

exports.index = (req, res) => {
    outletModel.getContent().then(result => {
        res.render('outlet', Object.assign({}, renderData, result));
    });
};

exports.getGoodsList = (req, res) => {
    var queryParam = req.query;

    res.send(queryParam);
};