Authored by zhangxiaoru

如果skn不是学生商品的则不显示商品

... ... @@ -29,11 +29,19 @@ const _getRelatedData = (idList) => {
method: 'h5.product.batch'
}).then((result) => {
let goods = [];
let goods = [],
productList = [];
if (result && result.code === 200) {
if (result && result.data.product_list && result.code === 200) {
goods = productProcess.processProductList(result.data.product_list);
_.forEach(result.data.product_list, function(val) {
if(val.student_price) {
productList.push(val);
}
});
goods = productProcess.processProductList(productList);
return goods;
} else {
... ... @@ -61,6 +69,7 @@ exports.index = (req, res, next) => {
link,
studentGoods,
idList = [],
goodShow,
// url,
// param,
... ... @@ -135,6 +144,7 @@ exports.index = (req, res, next) => {
options = {
isApp: req.__USER__.isApp,
goodShow: datas[1].length > 0 ? true : false,
goods: datas[1],
banner: banner,
icons: icons,
... ...
... ... @@ -97,7 +97,8 @@
{{/each}}
</section>
{{/activities}}
{{#if goodShow}}
<section class='s-section clearfix'>
<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}}'}}}">&#xe618;</a></h1>
<div class='goods-list clearfix'>
... ... @@ -143,6 +144,7 @@
</div>
<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>
</section>
{{/if}}
<div class="float-layer" id="float-layer-app">
<div class="float-layer-left">
... ...
.student-market {
margin-bottom: 26px;
.sm-layout {
height: 80px;
line-height: 80px;
... ...