Showing
3 changed files
with
8 additions
and
5 deletions
@@ -6,6 +6,9 @@ exports.index = function(req, res, next) { | @@ -6,6 +6,9 @@ exports.index = function(req, res, next) { | ||
6 | code: req.params.code, | 6 | code: req.params.code, |
7 | type: req.query.type | 7 | type: req.query.type |
8 | }).then((result) => { | 8 | }).then((result) => { |
9 | + if (!result) { | ||
10 | + return next(); | ||
11 | + } | ||
9 | res.render('feature', { | 12 | res.render('feature', { |
10 | module: 'activity', | 13 | module: 'activity', |
11 | page: 'feature', | 14 | page: 'feature', |
@@ -55,10 +55,9 @@ module.exports = { | @@ -55,10 +55,9 @@ module.exports = { | ||
55 | cache: true | 55 | cache: true |
56 | }); | 56 | }); |
57 | } | 57 | } |
58 | - if (data.code === 200) { | ||
59 | - data = data.data; | ||
60 | - } | ||
61 | - if (data.floors) { | 58 | + |
59 | + data = data.data; | ||
60 | + if (data && data.floors) { | ||
62 | data.floors.forEach(function(f) { | 61 | data.floors.forEach(function(f) { |
63 | if (f.component && f.component[0] && f.component[0].type === 'productGroup' && f.component[0].defaultSkns) { | 62 | if (f.component && f.component[0] && f.component[0].type === 'productGroup' && f.component[0].defaultSkns) { |
64 | sknsArr.push(_getProductBySkns(f.component[0])); | 63 | sknsArr.push(_getProductBySkns(f.component[0])); |
@@ -69,6 +68,7 @@ module.exports = { | @@ -69,6 +68,7 @@ module.exports = { | ||
69 | if (sknsArr.length) { | 68 | if (sknsArr.length) { |
70 | yield Promise.all(sknsArr); | 69 | yield Promise.all(sknsArr); |
71 | } | 70 | } |
71 | + | ||
72 | return data; | 72 | return data; |
73 | })(); | 73 | })(); |
74 | } | 74 | } |
@@ -71,7 +71,7 @@ | @@ -71,7 +71,7 @@ | ||
71 | 71 | ||
72 | {{#isEqualOr type 'productGroup'}} | 72 | {{#isEqualOr type 'productGroup'}} |
73 | {{! 商品池}} | 73 | {{! 商品池}} |
74 | - <div class="product-container item{{numOfOneRow}}" {{#if proBgImg}}style="background:url({{proBgImg}})repeat;"{{/if}}> | 74 | + <div class="product-container item{{numOfOneRow}}" {{#if proBgImg}}style="background:url({{image2 proBgImg q=60}})repeat;"{{/if}}> |
75 | <div class="product-source" {{#unless defaultPros.length}} {{#if searchCondition }}cloneitem="{{searchCondition.limit}}"{{/if}}{{/unless}} condition='{{stringify searchCondition}}' fp="{{getAnalysis ../this @index}}"> | 75 | <div class="product-source" {{#unless defaultPros.length}} {{#if searchCondition }}cloneitem="{{searchCondition.limit}}"{{/if}}{{/unless}} condition='{{stringify searchCondition}}' fp="{{getAnalysis ../this @index}}"> |
76 | <input class="imgwh" type="hidden" value="193x257"> | 76 | <input class="imgwh" type="hidden" value="193x257"> |
77 | {{#if defaultPros.length}} | 77 | {{#if defaultPros.length}} |
-
Please register or login to post a comment