...
|
...
|
@@ -87,17 +87,15 @@ function fetchProductList(activityInfo, uid) { |
|
|
.then(res => {
|
|
|
let r1 = res[0];
|
|
|
let r2 = res[1];
|
|
|
let result = {
|
|
|
products: []
|
|
|
};
|
|
|
let result = [];
|
|
|
|
|
|
if (r1.code !== 200) {
|
|
|
return result;
|
|
|
}
|
|
|
|
|
|
r2.data ?
|
|
|
result.products = _productAddFlag(r1.data, r2.data) :
|
|
|
result.products = _productAddFlag(r1.data);
|
|
|
result = r2.data ?
|
|
|
_productAddFlag(r1.data, r2.data) :
|
|
|
_productAddFlag(r1.data);
|
|
|
|
|
|
return result;
|
|
|
});
|
...
|
...
|
@@ -250,7 +248,7 @@ const getProductList = (req, res, next) => { |
|
|
console.log(activityInfo)
|
|
|
|
|
|
return fetchProductList(activityInfo, uid).then(resultProducts => {
|
|
|
res.render('seckill/product-list', Object.assign(resultProducts, {
|
|
|
res.render('seckill/product-list', Object.assign({products: resultProducts}, {
|
|
|
layout: false
|
|
|
}, {
|
|
|
helpers: _helpers
|
...
|
...
|
|