shop-api.js 951 Bytes
/**
 * 店铺相关api调用
 *
 * @author: jiangfeng<jeff.jiang@yoho.cn>
 * @date: 2016/07/14
 **/

'use strict';

const Api = global.yoho.API;

const ShopApi = {
    getShopIntro(shopId, uid) {
        let param = {
            method: 'app.shops.getIntro',
            shop_id: shopId
        };

        if (uid) {
            param.uid = uid;
        }

        return Api.get('', param);
    },

    getShopDecorator(shopId) {
        let param = {
            method: 'app.shopsdecorator.getList',
            shop_id: shopId
        };

        return Api.get('', param);
    },

    getShopSorts(shopId, channel, gender) {
        let param = {
            method: 'app.shop.getSortInfo',
            shop_id: shopId
        };

        if (channel) {
            param.yh_channel = channel;
        }

        if (gender) {
            param.gender = gender;
        }

        return Api.get('', param);
    }
};

module.exports = ShopApi;