...
|
...
|
@@ -39,22 +39,22 @@ function getSearchRecommend() { |
|
|
return;
|
|
|
}
|
|
|
|
|
|
for (i = 0; i < res.length; i++) {
|
|
|
cur = res[i];
|
|
|
|
|
|
recommendGood.push({
|
|
|
href: cur.url,
|
|
|
img: cur.pic_url,
|
|
|
title: cur.product_name,
|
|
|
price: cur.price,
|
|
|
marketPrice: cur.market_price
|
|
|
});
|
|
|
}
|
|
|
// for (i = 0; i < res.length; i++) {
|
|
|
// cur = res[i];
|
|
|
//
|
|
|
// recommendGood.push({
|
|
|
// href: cur.url,
|
|
|
// img: cur.pic_url,
|
|
|
// title: cur.product_name,
|
|
|
// price: cur.price,
|
|
|
// marketPrice: cur.market_price
|
|
|
// });
|
|
|
// }
|
|
|
|
|
|
$recommendSlide.html(recommendTpl({
|
|
|
item: recommendGood,
|
|
|
hasNext: recommendGood && recommendGood.length > 5,
|
|
|
hasPrev: recommendGood && recommendGood.length > 5
|
|
|
item: res,
|
|
|
hasNext: res && res.length > 5,
|
|
|
hasPrev: res && res.length > 5
|
|
|
}));
|
|
|
lazyLoad($recommendSlide.find('.lazy'));
|
|
|
|
...
|
...
|
|