brand.js 1.21 KB
/**
 * 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`);

/**
 * 品牌,品类,店铺相关页面
 */
const component = {

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

        brandModel.getBrandData(params).then(result => {
            res.render('brand/index', {
                module: 'channel',
                page: 'brand',
                result: result
            });
        });
    },
    letterList: (req, res, next) => {
        res.json(
            [
                {
                    id: 'A',
                    name: 'A'
                },
                {
                    id: 'B',
                    name: 'B'
                },
                {
                    id: 'C',
                    name: 'C'
                },
                {
                    id: 'D',
                    name: 'D'
                },
                {
                    id: 'E',
                    name: 'E'
                }
            ]
        );
    }
};

module.exports = component;