...
|
...
|
@@ -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';
|
...
|
...
|
@@ -531,36 +531,24 @@ 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) {
|
|
|
if (count++ < 3) {
|
|
|
let smallPic = {};
|
|
|
|
|
|
smallPic.link = picList.url;
|
...
|
...
|
@@ -569,9 +557,9 @@ exports.handleSaleBannerSmallData = (origin) => { |
|
|
smallPic.desc = picList.alt;
|
|
|
|
|
|
dest.push(smallPic);
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
|
|
|
});
|
|
|
|
|
|
return dest;
|
...
|
...
|
|