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

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

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

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

exports.activity = (req, res) => {
    renderData.page = 'outlet-detail';
    outletModel.getActivity(req.query.id).then(result => {
        res.render('outlet/activity', Object.assign(renderData, result));
    });
};

exports.willBeEnd = (req, res) => {
    outletModel.willBeEnd().then(result => {
        console.log(result);
        res.render('outlet/will-end', Object.assign(renderData, result));
    });
};

exports.willBeCome = (req, res) => {
    outletModel.willBeCome().then(result => {
        res.render('outlet/will-start', Object.assign(renderData, result));
    });
};