index.js 494 Bytes
/**
 * girls controller
 * @author: 赵彪<bill.zhao@yoho.cn>
 * @date: 2016/05/16
 */

'use strict';


const channelModel = require('../models/index');

exports.boysIndex = (req, res) => {
    channelModel.getContent('boys').then(data => {
        res.render('boys', data);
    });
};

exports.getNewArrival = (req, res) => {
    channelModel.getNewArrival().then(data => {
        let result = {
            code: 200,
            goods: data
        };

        res.send(result);
    });
};