brand.js 1.18 KB
/**
 * 品牌
 * @author: zxr<xiaoru.zhang@yoho.cn>
 * @date: 2016/7/8
 */

/**
 * 品牌一览
 * @author: zxr
 * @date: 2016/07/13
 */

'use strict';
const brand = require('../models/brand');

/**
 * 品牌一览数据
 * @param req
 * @param res
 */
const index = (req, res, next) => {
    let channel = req.query.brand || 1;
    let contentCode = 'd0149783b8dd2adaf083fd10556c39a9';
    let appType = 1;

    brand.getListData(contentCode, channel, appType).then((result) => {
        res.display('index', {
            module: 'brand',
            page: 'index',
            title: '品牌',
            brand: {
                nav: [
                    {
                        link: '//guang.yohobuy.com/index/index?type=0',
                        pathTitle: '首页',
                        name: 'MEN首页'
                    },
                    {
                        link: '',
                        pathTitle: '品牌',
                        name: 'Brand品牌'
                    }
                ],
                tabs: result.tabs,
                category: result.category
            }
        });
    }).catch(next);
};

module.exports = {
    index // 品牌一览
};