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

// api调用列表
let domainApis = {
    erp: {
        login: '/erp-shop-web/account/profile/login',
        getPurview: '/erp-shop-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',
        getShopDetailById: '/SellerShopController/getShopDetailById',
        updateShopBaseInfoById: '/SellerShopController/updateShopBaseInfoById',
        uploads: '/fileupload/uploads',
        findBusinessShopsDecorator: '/ShopsDecoratorRest/findBusinessShopsDecorator',
        getShopsCategoryList: '/SellerShopController/getShopsCategoryList',
        addOrUpdateShopsCategory: '/SellerShopController/addOrUpdateShopsCategory',
        deleteShopsCategory: '/SellerShopController/deleteShopsCategory',
        getAllProduct: '/SellerShopController/getAllProduct',
        getBindProductCount: '/SellerShopController/getBindProductCount',
        getBindProduct: '/SellerShopController/getBindProduct',
        addCategoryLinkProduct: '/SellerShopController/addCategoryLinkProduct',
        deleteCategoryLinkProduct: '/SellerShopController/deleteCategoryLinkProduct'
    },
    shop: {
        login: '/loginInter'
    }
};

// 域名列表
const domains = {
    erp: 'http://192.168.103.82:9098',
    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;