Showing
3 changed files
with
17 additions
and
3 deletions
@@ -29,11 +29,19 @@ const _getRelatedData = (idList) => { | @@ -29,11 +29,19 @@ const _getRelatedData = (idList) => { | ||
29 | method: 'h5.product.batch' | 29 | method: 'h5.product.batch' |
30 | }).then((result) => { | 30 | }).then((result) => { |
31 | 31 | ||
32 | - let goods = []; | 32 | + let goods = [], |
33 | + productList = []; | ||
33 | 34 | ||
34 | - if (result && result.code === 200) { | 35 | + if (result && result.data.product_list && result.code === 200) { |
35 | 36 | ||
36 | - goods = productProcess.processProductList(result.data.product_list); | 37 | + _.forEach(result.data.product_list, function(val) { |
38 | + | ||
39 | + if(val.student_price) { | ||
40 | + productList.push(val); | ||
41 | + } | ||
42 | + }); | ||
43 | + | ||
44 | + goods = productProcess.processProductList(productList); | ||
37 | 45 | ||
38 | return goods; | 46 | return goods; |
39 | } else { | 47 | } else { |
@@ -61,6 +69,7 @@ exports.index = (req, res, next) => { | @@ -61,6 +69,7 @@ exports.index = (req, res, next) => { | ||
61 | link, | 69 | link, |
62 | studentGoods, | 70 | studentGoods, |
63 | idList = [], | 71 | idList = [], |
72 | + goodShow, | ||
64 | 73 | ||
65 | // url, | 74 | // url, |
66 | // param, | 75 | // param, |
@@ -135,6 +144,7 @@ exports.index = (req, res, next) => { | @@ -135,6 +144,7 @@ exports.index = (req, res, next) => { | ||
135 | 144 | ||
136 | options = { | 145 | options = { |
137 | isApp: req.__USER__.isApp, | 146 | isApp: req.__USER__.isApp, |
147 | + goodShow: datas[1].length > 0 ? true : false, | ||
138 | goods: datas[1], | 148 | goods: datas[1], |
139 | banner: banner, | 149 | banner: banner, |
140 | icons: icons, | 150 | icons: icons, |
@@ -98,6 +98,7 @@ | @@ -98,6 +98,7 @@ | ||
98 | </section> | 98 | </section> |
99 | {{/activities}} | 99 | {{/activities}} |
100 | 100 | ||
101 | + {{#if goodShow}} | ||
101 | <section class='s-section clearfix'> | 102 | <section class='s-section clearfix'> |
102 | <h1>学生专享商品<a class="more iconfont" href="//search.m.yohobuy.com/?students=1&title=学生专享商品&uid={{uid}}{{#isApp}}&app_version={{@root.app_version}}{{/isApp}}?openby:yohobuy={'action':'go.h5','params':{'islogin':'N','url':'{{@root.http}}//search.m.yohobuy.com/','param':{'students':'1','title':'学生专享商品','uid':'{{uid}}'}}}"></a></h1> | 103 | <h1>学生专享商品<a class="more iconfont" href="//search.m.yohobuy.com/?students=1&title=学生专享商品&uid={{uid}}{{#isApp}}&app_version={{@root.app_version}}{{/isApp}}?openby:yohobuy={'action':'go.h5','params':{'islogin':'N','url':'{{@root.http}}//search.m.yohobuy.com/','param':{'students':'1','title':'学生专享商品','uid':'{{uid}}'}}}"></a></h1> |
103 | <div class='goods-list clearfix'> | 104 | <div class='goods-list clearfix'> |
@@ -143,6 +144,7 @@ | @@ -143,6 +144,7 @@ | ||
143 | </div> | 144 | </div> |
144 | <a class='s-more' href="//search.m.yohobuy.com/?students=1&title=学生专享商品&uid={{uid}}{{#isApp}}&app_version={{@root.app_version}}{{/isApp}}?openby:yohobuy={'action':'go.h5','params':{'islogin':'N','url':'{{@root.http}}//search.m.yohobuy.com/','param':{'students':'1','title':'学生专享商品','uid':'{{uid}}'}}}">查看更多</a> | 145 | <a class='s-more' href="//search.m.yohobuy.com/?students=1&title=学生专享商品&uid={{uid}}{{#isApp}}&app_version={{@root.app_version}}{{/isApp}}?openby:yohobuy={'action':'go.h5','params':{'islogin':'N','url':'{{@root.http}}//search.m.yohobuy.com/','param':{'students':'1','title':'学生专享商品','uid':'{{uid}}'}}}">查看更多</a> |
145 | </section> | 146 | </section> |
147 | + {{/if}} | ||
146 | 148 | ||
147 | <div class="float-layer" id="float-layer-app"> | 149 | <div class="float-layer" id="float-layer-app"> |
148 | <div class="float-layer-left"> | 150 | <div class="float-layer-left"> |
-
Please register or login to post a comment