apiDomain.js
949 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
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;