apiDomain.js 949 Bytes
const _ = require('lodash');

// 域名列表
const domains = {
    auth: 'http://serve.yohobuy.com',
    shop: 'http://192.168.102.210:8088/platform'
};

// api调用列表
let domainApis = {
    auth: {
        login: {
            path: '/service/account/v1/Profile/login'
        }
    },
    shop: {
        profile: {
            path: '/SellerShopController/queryShopsByAdminPid'
        },
        brand: {
            path: '/SellerProductController/getSellerBrandInfo'
        },
        sort: {
            path: '/SellerProductController/getSellerSortInfo'
        },
        color: {
            path: '/SellerProductController/querySellerProductColors'
        },
        size: {
            path: '/SellerSortSizeController/querySortSize'
        }
    }
};

_.each(domainApis, (apis, domainName) => {
    _.each(apis, (uri, api) => {
        apis[api].url = domains[domainName] + uri.path;
    });
});


module.exports = domainApis;