Authored by hongweigao

修改接口

... ... @@ -39,7 +39,8 @@ exports.getNewArrival = (req, res, next) => {
channel = reqBody.type || req.yoho.channel,
goods = [],
result = {},
isJKChannel = reqBody.mChannel === 'japanKorean' ? true : false;
isJKChannel = reqBody.mChannel === 'japanKorean' ? true : false,
poolId = reqBody.poolId;
if (pageIndex < 0) {
pageIndex = 0;
... ... @@ -48,7 +49,7 @@ exports.getNewArrival = (req, res, next) => {
pageCount = 20;
}
channelModel.getNewArrival(channel, isJKChannel).then(data => {
channelModel.getNewArrival(channel, isJKChannel, poolId).then(data => {
goods = _.slice(data, pageIndex, pageIndex + pageCount);
if (goods.length !== 0) {
... ...
... ... @@ -434,6 +434,7 @@ const _getSingleHotFloorData = (args, type) => {
return _getGirlsSingleHot(args, type);
}
};
/**
* 组装最新上架楼层数据
*
... ... @@ -927,7 +928,7 @@ const formatIndexGuideData = data => {
* @param string $channel
* @return array
*/
const getNewArrival = (channel, isJKChannel)=> {
const getNewArrival = (channel, isJKChannel, poolId)=> {
let rel = [],
sortList = sortMap[channel],
params = {},
... ... @@ -936,7 +937,7 @@ const getNewArrival = (channel, isJKChannel)=> {
if (isJKChannel) {
method = 'app.search.sales';
params = {
productPool: 519
productPool: poolId
};
} else {
method = 'web.search.newshelve';
... ... @@ -951,7 +952,7 @@ const getNewArrival = (channel, isJKChannel)=> {
}
params.gender = channelMap[channel].gender;
// params.gender = channelMap[channel].gender;
_.forEach(sortList, (item) => {
let data = Object.assign(item, params, {limit: item.viewNum});
... ...
... ... @@ -17,11 +17,12 @@ module.exports = {
cookieDomain: '.yohobuy.com',
domains: {
favApi: 'http://192.168.102.31:8092/brower',
api: 'http://api-test3.yohops.com:9999/',
service: 'http://service-test3.yohops.com:9999/',
// api: 'http://api.yoho.cn/',
// service: 'http://service.yoho.cn/',
// api: 'http://api-test3.yohops.com:9999/',
// service: 'http://service-test3.yohops.com:9999/',
api: 'http://dev-api.yohops.com:9999/',
service: 'http://dev-service.yohops.com:9999/',
search: 'http://192.168.102.216:8080/yohosearch/'
},
subDomains: {
... ...
... ... @@ -41,6 +41,7 @@ if ($.inArray(homePage, ['boys', 'girls', 'kids', 'lifestyle']) > -1) {
if (mChannel !== '') {
newArrParams.mChannel = mChannel;
newArrParams.poolId = window.queryString().template_id;
}
require('../product/index/new-arrivls')(newArrParams);
... ...