Authored by biao

update for new arravals

@@ -45,11 +45,11 @@ const channelMap = { @@ -45,11 +45,11 @@ const channelMap = {
45 }, 45 },
46 kids: { 46 kids: {
47 code: 'd71f4b27f2a7229fbb31a4bc490a6f36', 47 code: 'd71f4b27f2a7229fbb31a4bc490a6f36',
48 - gender: 'kids' 48 + gender: '2,3'
49 }, 49 },
50 lifestyle: { 50 lifestyle: {
51 code: '8a341ca7eacc069ba80f02dec80eaf34', 51 code: '8a341ca7eacc069ba80f02dec80eaf34',
52 - gender: 'lifestyle' 52 + gender: '2,3'
53 } 53 }
54 }; 54 };
55 55
@@ -639,18 +639,12 @@ exports.getNewArrival = channel => { @@ -639,18 +639,12 @@ exports.getNewArrival = channel => {
639 sales: 'Y', 639 sales: 'Y',
640 attribute_not: 2, 640 attribute_not: 2,
641 stocknumber: 3, 641 stocknumber: 3,
642 - shelve_time: getShelveTime(6) 642 + shelve_time: getShelveTime(20)
643 }; 643 };
644 644
645 - // 最新上架参数(男首频道:gender=1,3 女首频道gender=2,4)  
646 - // if (channel === 'boys') {  
647 - // params.gender = '1,3';  
648 - // } else {  
649 - // params.gender = '2,4';  
650 - // }  
651 -  
652 params.gender = channelMap[channel].gender; 645 params.gender = channelMap[channel].gender;
653 646
  647 +
654 _.forEach(sortList, (item) => { 648 _.forEach(sortList, (item) => {
655 let data = Object.assign(item, params); 649 let data = Object.assign(item, params);
656 650
@@ -661,6 +655,8 @@ exports.getNewArrival = channel => { @@ -661,6 +655,8 @@ exports.getNewArrival = channel => {
661 let data = [], 655 let data = [],
662 result = []; 656 result = [];
663 657
  658 + console.log(res);
  659 +
664 _.forEach(sortList, (it, index) => { 660 _.forEach(sortList, (it, index) => {
665 if (res[index].data.product_list.length === sortList[index].viewNum) { 661 if (res[index].data.product_list.length === sortList[index].viewNum) {
666 data = data.concat(res[index].data.product_list); 662 data = data.concat(res[index].data.product_list);