Authored by 陈峰

newarrival api

... ... @@ -1096,15 +1096,40 @@ module.exports = class extends global.yoho.BaseModel {
return Promise.all(rel).then();
}
} else {
method = 'web.search.newshelve';
if (!sortList.length) {
return Promise.all(rel).then();
}
let viewNum = _.first(sortList).viewNum;
params = {
method: 'web.search.newShelveBatch',
order: 'shelve_time:desc',
status: 1,
sales: 'Y',
attribute_not: 2,
stocknumber: 3,
dayLimit: 4
dayLimit: 4,
limit: viewNum,
viewNum,
gender: channelMap[channel].gender,
misort: _.join(_.map(sortList, s => s.misort), ',')
};
return this.get({
data: params,
param: {cache: true}
}).then(res => {
let result = [];
let list = _.get(res, 'data.product_list', []);
_.forEach(list, (item) => {
result.push(processProduct(item, {
width: 280,
height: 373,
gender: params.gender
}));
});
return result;
});
}
... ...
... ... @@ -21,13 +21,13 @@ module.exports = {
cookieDomain: '.yohobuy.com',
domains: {
// test3
// singleApi: 'http://api-test3.yohops.com:9999/',
// api: 'http://api-test3.yohops.com:9999/',
// service: 'http://api-test3.yohops.com:9999/',
// serviceNotify: 'http://api-test3.yohops.com:9999/',
// global: 'http://global-test-soa.yohops.com:9999/',
// platformApi: 'http://192.168.102.48:8088/',
// yohoNowApi: 'http://yohonow-test.yohops.com:9999/',
singleApi: 'http://api-test3.yohops.com:9999/',
api: 'http://api-test3.yohops.com:9999/',
service: 'http://api-test3.yohops.com:9999/',
serviceNotify: 'http://api-test3.yohops.com:9999/',
global: 'http://global-test-soa.yohops.com:9999/',
platformApi: 'http://192.168.102.48:8088/',
yohoNowApi: 'http://yohonow-test.yohops.com:9999/',
// test2
// singleApi: 'http://api-test2.yohops.com:9999/',
... ... @@ -38,11 +38,11 @@ module.exports = {
// platformApi: 'http://192.168.102.48:8088/',
// prod
singleApi: 'http://api.yoho.cn/',
api: 'http://api.yoho.cn/',
service: 'http://api.yoho.cn/',
serviceNotify: 'http://service.yoho.cn/',
platformApi: 'http://172.16.6.210:8088/',
// singleApi: 'http://api.yoho.cn/',
// api: 'http://api.yoho.cn/',
// service: 'http://api.yoho.cn/',
// serviceNotify: 'http://service.yoho.cn/',
// platformApi: 'http://172.16.6.210:8088/',
// gray
// singleApi: 'http://apigray.yoho.cn/',
... ... @@ -113,7 +113,7 @@ module.exports = {
port: '4444' // influxdb port
},
console: {
level: 'debug',
level: 'info',
colorize: 'all',
prettyPrint: true
}
... ...