Authored by 石坚

camel个人中心

... ... @@ -72,7 +72,7 @@ const favorite = {
});
retData.products = data.product_list.filter(p => {
return !sort || sort === p.categoryId;
return !sort || sort === p.category_id;
}).slice((page - 1) * 16, page * 16);
retData.products.forEach(p => {
... ... @@ -91,7 +91,7 @@ const favorite = {
ret.content.banner = thumb;
}
res.display('index', ret); console.log(JSON.stringify(ret));
res.display('index', ret);
}).catch(next);
},
... ... @@ -144,14 +144,14 @@ const favorite = {
if (retData.brandList) {
_.each(retData.brandList, b => {
if (b.newProduct && b.newProduct.length > 0) {
b.newProduct.forEach(p => {
if (b.new_product && b.new_product.length > 0) {
b.new_product.forEach(p => {
p.url = `${config.siteUrl}/product/pro_${p.productId}_${p.goods[0].id}/${p.cnAlphabet}.html`; // eslint-disable-line
});
b.newProduct.push({
b.new_product.push({
more: true
});
b.newProduct = _.chunk(b.newProduct, 4);
b.new_product = _.chunk(b.new_product, 4);
} else {
b.noNewProduct = true;
}
... ...
... ... @@ -40,7 +40,7 @@
</div>
<div class="slide-wrap">
<ul>
{{#each newProduct}}
{{#each new_product}}
<li class="clearfix">
{{#each this}}
{{#if more}}
... ...