...
|
...
|
@@ -2,7 +2,7 @@ |
|
|
* @Author: Targaryen
|
|
|
* @Date: 2016-05-25 18:16:59
|
|
|
* @Last Modified by: Targaryen
|
|
|
* @Last Modified time: 2016-06-01 16:44:04
|
|
|
* @Last Modified time: 2016-06-01 17:01:39
|
|
|
*/
|
|
|
|
|
|
'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) {
|
...
|
...
|
@@ -531,47 +531,35 @@ exports.handleSaleBannerData = (origin) => { |
|
|
});
|
|
|
}
|
|
|
|
|
|
if (value.template_name === 'small_pic') {
|
|
|
_.forEach(value.data, function(picList) {
|
|
|
let smallPic = {};
|
|
|
|
|
|
smallPic.link = picList.url;
|
|
|
smallPic.icon = picList.src;
|
|
|
smallPic.title = picList.title;
|
|
|
smallPic.desc = picList.alt;
|
|
|
|
|
|
dest.list.push(smallPic);
|
|
|
});
|
|
|
}
|
|
|
|
|
|
});
|
|
|
|
|
|
return dest;
|
|
|
};
|
|
|
|
|
|
/**
|
|
|
* 处理首页 banner 小图
|
|
|
* 处理首页 banner 小图 只取前三张
|
|
|
* @param {[type]} origin [description]
|
|
|
* @return {[type]} [description]
|
|
|
*/
|
|
|
exports.handleSaleBannerSmallData = (origin) => {
|
|
|
var dest = [];
|
|
|
let count = 0;
|
|
|
|
|
|
_.forEach(origin, function(value) {
|
|
|
|
|
|
if (value.template_name === 'small_pic') {
|
|
|
_.forEach(value.data, function(picList) {
|
|
|
let smallPic = {};
|
|
|
if (count++ < 3) {
|
|
|
let smallPic = {};
|
|
|
|
|
|
smallPic.link = picList.url;
|
|
|
smallPic.icon = picList.src;
|
|
|
smallPic.title = picList.title;
|
|
|
smallPic.desc = picList.alt;
|
|
|
smallPic.link = picList.url;
|
|
|
smallPic.icon = picList.src;
|
|
|
smallPic.title = picList.title;
|
|
|
smallPic.desc = picList.alt;
|
|
|
|
|
|
dest.push(smallPic);
|
|
|
dest.push(smallPic);
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
|
|
|
});
|
|
|
|
|
|
return dest;
|
...
|
...
|
@@ -724,12 +712,12 @@ exports.handleSalePagerData = (total, params) => { |
|
|
// 处理上一页下一页
|
|
|
if (currentPage !== 1) {
|
|
|
dest = '<a href="' + handleFilterUrl(params, { page: currentPage - 1 }) +
|
|
|
'"><span class="iconfont">上一页</span></a>' + dest;
|
|
|
'"><span class="iconfont">上一页</span></a>' + dest;
|
|
|
}
|
|
|
|
|
|
if (currentPage !== totalPage) {
|
|
|
dest += '<a href="' + handleFilterUrl(params, { page: currentPage + 1 }) +
|
|
|
'"><span class="iconfont">下一页</span></a>';
|
|
|
'"><span class="iconfont">下一页</span></a>';
|
|
|
}
|
|
|
|
|
|
return dest;
|
...
|
...
|
|