brand-api.js 908 Bytes
/**
 * Created by PhpStorm.
 * User: Targaryen
 * Date: 2016/7/19
 * Time: 14:02
 */
'use strict';
const api = global.yoho.API;

const yhChannel = {
    men: {
        channel: '301'
    },
    women: {
        channel: '302'
    },
    lifestyle: {
        channel: '303'
    }
};

module.exports = {

    /**
     * 从接口获取品牌列表页数据
     * @returns {*}
     */
    getBrandListOriginData(params) {
        return api.get('', {
            method: 'app.brand.newBrandList',
            yh_channel: yhChannel[params.channel].channel
        }, {
            code: 200,
            cache: true
        });
    },

    /**
     * 从接口获取全部分类数据
     * @returns {*}
     */
    getCateListData(params) {
        return api.get('', Object.assign(params, {
            method: 'app.sort.get'
        }, {
            code: 200,
            cache: true
        }));
    }
};