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

const yhChannel = {
    men: {
        channel: '1'
    },
    women: {
        channel: '2'
    },
    lifestyle: {
        channel: '4'
    }
};

module.exports = {

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

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