brand.js 799 Bytes
/**
 * 品牌页
 * <jing.li@yoho.cn>
 * 2016/09/19
 */

'use strict';

const headerModel = require('../../../doraemon/models/header'); // 头部model
const indexModel = require('../models/brand');

let index = (req, res, next) => {

    let headerData = headerModel.setNav({
        navTitle: '品牌一览'
    });

    let responseData = {
        pageHeader: headerData,
        module: 'channel',
        page: 'brand',
        title: '品牌一览',
        //pageFooter: true
    };

    let param = {

        channel: req.query.channel || '1',

        gender: req.query.gender || '1,3'

    };

    indexModel.getBrandByChannel(param.channel).then(result => {
        res.render('brand/index', Object.assign(responseData, result));
    }).catch(next);

};

module.exports = {
    index
};