Authored by 周少峰

new path

@@ -95,7 +95,7 @@ exports.getListData = (params, channel) => { @@ -95,7 +95,7 @@ exports.getListData = (params, channel) => {
95 Object.assign({showDiscount: false}, params)), 95 Object.assign({showDiscount: false}, params)),
96 96
97 // 最近浏览记录 97 // 最近浏览记录
98 - latestWalk: 7, 98 + latestWalk: 7
99 }); 99 });
100 } 100 }
101 101
@@ -159,7 +159,7 @@ exports.getListNewData = (params, channel) => { @@ -159,7 +159,7 @@ exports.getListNewData = (params, channel) => {
159 Object.assign({showDiscount: false}, params)), 159 Object.assign({showDiscount: false}, params)),
160 160
161 // 最近浏览记录 161 // 最近浏览记录
162 - latestWalk: 7, 162 + latestWalk: 7
163 }); 163 });
164 } 164 }
165 165
@@ -248,7 +248,7 @@ exports.getBrandData = (params, extra, channel) => { @@ -248,7 +248,7 @@ exports.getBrandData = (params, extra, channel) => {
248 Object.assign({showDiscount: false}, params)), 248 Object.assign({showDiscount: false}, params)),
249 249
250 // 最近浏览记录 250 // 最近浏览记录
251 - latestWalk: 7, 251 + latestWalk: 7
252 }); 252 });
253 } 253 }
254 254
@@ -877,6 +877,16 @@ exports.handlePathNavData = (data, params, page) => { @@ -877,6 +877,16 @@ exports.handlePathNavData = (data, params, page) => {
877 } 877 }
878 ); 878 );
879 break; 879 break;
  880 + case 'new':
  881 +
  882 + // 新品到着
  883 + pathNav.push(
  884 + {
  885 + name: '新品到着',
  886 + pathTitle: '新品到着'
  887 + }
  888 + );
  889 + break;
880 default : 890 default :
881 // 分类 891 // 分类
882 _.forEach(data, (sort) => { 892 _.forEach(data, (sort) => {
@@ -1074,12 +1084,14 @@ exports.handleWeekNew = (data, params) => { @@ -1074,12 +1084,14 @@ exports.handleWeekNew = (data, params) => {
1074 }; 1084 };
1075 1085
1076 _.forEach(data.recent, function(value, key) { 1086 _.forEach(data.recent, function(value, key) {
1077 - let t = _.split(key, '-'); 1087 + let t = _.split(key, '-'),
  1088 + dayStart = new Date(t[0],parseInt(t[1])-1,t[2]).getTime()/1000,
  1089 + day = `${dayStart},${dayStart + 86400}`;
1078 1090
1079 list.push({ 1091 list.push({
1080 name: `${t[1] || ''}${t[2] || ''}日`, 1092 name: `${t[1] || ''}${t[2] || ''}日`,
1081 - href: handleFilterUrl(params, {shelveTime: key}),  
1082 - active: key === params.shelveTime, 1093 + href: handleFilterUrl(params, {shelveTime: day}),
  1094 + active: day === params.shelveTime,
1083 sort: +t.join('') 1095 sort: +t.join('')
1084 }); 1096 });
1085 }); 1097 });