brand.js 968 Bytes
/**
 * Created by PhpStorm.
 * User: Targaryen
 * Date: 2016/7/19
 * Time: 10:03
 */
'use strict';

// const _ = require('lodash');
// const helpers = global.yoho.helpers;
const mRoot = '../models';
const brandModel = require(`${mRoot}/brand`);

/**
 * 品牌,品类,店铺相关页面
 */
module.exports = {

    /* 品牌店铺页面 */
    index: (req, res) => {
        let params = req.query;

        brandModel.getBrandData(params).then(result => {
            res.render('brand/index', {
                module: 'channel',
                page: 'brand',
                result: result
            });
        });
    },

    /* 品牌列表页 */
    brandList: (req, res) => {
        let params = req.query;

        brandModel.getBrandListData(params).then(result => {
            res.render('brand/brand-list', {
                module: 'channel',
                page: 'brand-list',
                result: result
            });
        });
    }
};