...
|
...
|
@@ -2,7 +2,7 @@ |
|
|
* @Author: Targaryen
|
|
|
* @Date: 2016-05-25 18:16:59
|
|
|
* @Last Modified by: Targaryen
|
|
|
* @Last Modified time: 2016-06-06 17:06:34
|
|
|
* @Last Modified time: 2016-06-06 17:28:21
|
|
|
*/
|
|
|
|
|
|
'use strict';
|
...
|
...
|
@@ -179,8 +179,8 @@ const handleSalebreakingYardsSortData = (origin, params) => { |
|
|
|
|
|
// 判断是否在这组数据里面
|
|
|
if (!_.isEmpty(_.find(value.sort_id.split(','), o => {
|
|
|
return o === sortParam;
|
|
|
}))) {
|
|
|
return o === sortParam;
|
|
|
}))) {
|
|
|
|
|
|
// 如果在某组数据里面,组合数据退出循环
|
|
|
_.forEach(value.sub, function(subValue) {
|
...
|
...
|
@@ -586,22 +586,27 @@ exports.handleSaleCategoryData = (origin, saleType, channel) => { |
|
|
dest.navItem[0].title = '今日推荐';
|
|
|
dest.navItem[0].vip = true;
|
|
|
|
|
|
let urlLocation = {};
|
|
|
|
|
|
// title urlLocation 处理
|
|
|
switch (saleType) {
|
|
|
case '1':
|
|
|
dest.title = '断码区';
|
|
|
dest.urlLocation = dest.navItem[0].urlLocation = '?saleType=' + saleType +
|
|
|
'&order=s_t_desc&limit=14&channel=' + channel;
|
|
|
urlLocation.url = '?saleType=' + saleType + '&order=s_t_desc&channel=' + channel;
|
|
|
urlLocation.limit = 14;
|
|
|
dest.urlLocation = dest.navItem[0].urlLocation = urlLocation.url + `&limit=${urlLocation.limit}`;
|
|
|
break;
|
|
|
case '2':
|
|
|
dest.title = 'VIP会员专享';
|
|
|
dest.urlLocation = dest.navItem[0].urlLocation = '?saleType=' + saleType +
|
|
|
'&order=s_t_desc&limit=11&channel=' + channel;
|
|
|
urlLocation.url = '?saleType=' + saleType + '&order=s_t_desc&channel=' + channel;
|
|
|
urlLocation.limit = 11;
|
|
|
dest.urlLocation = dest.navItem[0].urlLocation = urlLocation.url + `&limit=${urlLocation.limit}`;
|
|
|
break;
|
|
|
case '3':
|
|
|
dest.title = '最新降价';
|
|
|
dest.urlLocation = dest.navItem[0].urlLocation = '?saleType=' + saleType +
|
|
|
'&order=s_t_desc&limit=14&channel=' + channel;
|
|
|
urlLocation.url = '?saleType=' + saleType + '&order=s_t_desc&channel=' + channel;
|
|
|
urlLocation.limit = 14;
|
|
|
dest.urlLocation = dest.navItem[0].urlLocation = urlLocation.url + `&limit=${urlLocation.limit}`;
|
|
|
break;
|
|
|
default:
|
|
|
break;
|
...
|
...
|
@@ -614,7 +619,8 @@ exports.handleSaleCategoryData = (origin, saleType, channel) => { |
|
|
if (count++ < 4) {
|
|
|
let nav = {};
|
|
|
|
|
|
nav.urlLocation = dest.urlLocation + '&sort=' + value.relation_parameter.sort;
|
|
|
nav.urlLocation = urlLocation.url + '&sort=' + value.relation_parameter.sort +
|
|
|
`&limit=${(urlLocation.limit + 1)}`;
|
|
|
nav.title = value.category_name;
|
|
|
nav.newDiscount = true;
|
|
|
|
...
|
...
|
|