api-domain.js 2.08 KB
const _ = require('lodash');

// api调用列表
let domainApis = {
    erp: {
        login: '/erp-gateway-web/account/profile/login',
        getPurview: '/erp-gateway-web/account/menu/query_by_pid'
    },
    platform: {
        queryShopsByAdminPid: '/SellerShopController/queryShopsByAdminPid',
        getSellerBrandInfo: '/SellerProductController/getSellerBrandInfo',
        getSellerSortInfo: '/SellerProductController/getSellerSortInfo',
        querySellerProductColors: '/SellerProductController/querySellerProductColors',
        querySortSize: '/SellerSortSizeController/querySortSize',
        addProduct: '/SellerProductController/addProduct',
        queryProductParamBySortId: '/SellerStandardController/queryProductParamBySortId',
        selectAttributes: '/SellerProductAttributeController/selectAttributes',
        querySellerProductMaterial: '/SellerProductController/querySellerProductMaterial',
        updateSellerProductNetSaleInfo: '/SellerProductController/updateSellerProductNetSaleInfo',
        querySellerProductList: '/SellerProductController/querySellerProductList',
        productOutSale: '/SellerSknStatusController/productOutSale',
        productOnSale: '/SellerSknStatusController/productOnSale',
        queryProdSizeList: '/SellerProductSize/queryProdSizeList',
        saveProdSizeInfo: '/SellerProductSize/saveProdSizeInfo',
        getSellerAllSortInfo: '/SellerProductController/getSellerAllSortInfo',
        exportSellerProductList: '/SellerProductController/exportSellerProductList',
        updateSellerPrice: '/SellerPriceController/updateSellerPrice',
        updateProduct: '/SellerProductController/updateProduct',
        getProduct: '/SellerProductController/getProduct'
    },
    shop: {
        loginInter: '/loginInter'
    }
};

// 域名列表
const domains = {
    erp: 'http://192.168.13.249',
    platform: 'http://192.168.102.210:8088/platform',
    shop: 'http://192.168.102.211:30016'
};

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

module.exports = domainApis;