Authored by zzzzzzz

新人专享,人气单品

... ... @@ -8,6 +8,7 @@ const utils = '../../../utils';
const contentCodeConfig = require('../../../config/content-code');
const _ = require('lodash');
const api = global.yoho.ServiceAPI;
const API = global.yoho.API;
const logger = global.yoho.logger;
const resourcesProcess = require(`${utils}/resources-process`);
... ... @@ -279,8 +280,20 @@ let getBottomBannerData = (gender) => {
});
};
/**
* 获取店铺推荐收藏和人数
*/
let shopRecom = (params) => {
return API.get('', {
method: 'app.shops.floorNewInfo',
shop_ids: params.shopIds,
uid: params.uid,
});
}
module.exports = {
getChannelData,
getChannelSwitchData,
getBottomBannerData
getBottomBannerData,
shopRecom,
};
... ...
... ... @@ -53,7 +53,7 @@
{{> resources/plus-star}}
{{/if}}
{{! 新人专享}}
{{#if newUserFloor}}
{{#if oldNewUserFloor}}
{{> resources/fresh-only}}
{{/if}}
{{! 秒杀}}
... ... @@ -80,11 +80,15 @@
{{#if shopRecommend}}
{{> resources/shop-recommand}}
{{/if}}
{{! 新新人专享}}
{{#if newUserFloor}}
{{> resources/new-user-floor}}
{{/if}}
{{! 人气单品}}
{{#if popularSingleProduct}}
{{> resources/hot-single}}
{{/if}}
{{/content}}
{{! 新新人专享}}
{{> resources/new-user-floor}}
{{! 人气单品}}
{{> resources/hot-single}}
{{! 新品首发楼层}}
{{> resources/new-first}}
... ...
{{#data}}
<div class="hot-single">
{{> common/floor-header-more}}
<a>
<img src="" alt="hot-single-banner" class="hot-single-banner" />
{{#banner_image}}
<a href="{{url}}">
<img src="{{image src 640 200}}" alt="hot-single-banner" class="hot-single-banner" />
</a>
<div class="hot-single-goods-list" style="background: #A9ECF2">
{{/banner_image}}
<div class="hot-single-goods-list" {{#background}}style="background: url({{src}})"{{/background}}>
<ul>
{{#list}}
<li class="hot-single-goods">
<img src="" alt="goods" class="goods-pic">
<a href="//m.yohobuy.com/product/show_{{product_skn}}">
<img src="{{image default_images 153 206}}" alt="goods" class="goods-pic">
<div class="goods-info">
<h3 class="price">&yen; 188.00</h3>
<p class="view-num">12人</p>
<h3 class="price">&yen; {{sales_price}}</h3>
<p class="view-num">{{view_num}}</p>
<p class="view-status">正在浏览</p>
</div>
</a>
</li>
<li class="hot-single-goods">
{{/list}}
<!--<li class="hot-single-goods">
<img src="" alt="goods" class="goods-pic">
<div class="goods-info">
<h3 class="price">&yen; 188.00</h3>
... ... @@ -54,7 +61,8 @@
<p class="view-num view-margin">大大王</p>
<p class="view-status view-margin">10分钟前购买</p>
</div>
</li>
</li>-->
</ul>
</div>
</div>
\ No newline at end of file
</div>
{{/data}}
\ No newline at end of file
... ...
{{#data}}
<div class="new-user-floor">
{{> common/floor-header-more}}
<div class="new-user-icon">新人专享</div>
<a>
<img src="" alt="new-user-banner" class="new-user-banner" />
{{#banner_image}}
<a href="{{url}}">
<img src="{{image src 640 200}}" alt="new-user-banner" class="new-user-banner" />
</a>
<div class="new-user-goods-container" style="background: #A9D4F3">
{{/banner_image}}
<div class="new-user-goods-container" {{#background}} style="background-image: url({{src}})" {{/background}}>
<ul>
{{#list}}
<li class="new-user-good">
<img src="" alt="" class="goods-pic" />
<a href="//m.yohobuy.com/product/show_{{product_skn}}">
<img src="{{image default_images 128 171}}" alt="goods-pic" class="goods-pic" />
<div class="goods-info">
<h3 class="title">冠军牌教练衫夹克</h3>
<p class="price">&yen; 130.00</p>
<p class="buy-now">立即购买></p>
</div>
</li>
<li class="new-user-good">
<img src="" alt="" class="goods-pic" />
<div class="goods-info">
<h3 class="title">冠军牌教练衫夹克你大爷的</h3>
<p class="price">&yen; 130.00</p>
<p class="buy-now">立即购买></p>
</div>
</li>
<li class="new-user-good">
<img src="" alt="" class="goods-pic" />
<div class="goods-info">
<h3 class="title">冠军牌教练衫夹克</h3>
<p class="price">&yen; 130.00</p>
<p class="buy-now">立即购买></p>
</div>
</li>
<li class="new-user-good">
<img src="" alt="" class="goods-pic" />
<div class="goods-info">
<h3 class="title">冠军牌教练衫夹克</h3>
<p class="price">&yen; 130.00</p>
<p class="buy-now">立即购买></p>
</div>
</li>
<li class="new-user-good">
<img src="" alt="" class="goods-pic" />
<div class="goods-info">
<h3 class="title">冠军牌教练衫夹克</h3>
<p class="price">&yen; 130.00</p>
<p class="buy-now">立即购买></p>
</div>
</li>
<li class="new-user-good">
<img src="" alt="" class="goods-pic" />
<div class="goods-info">
<h3 class="title">冠军牌教练衫夹克</h3>
<p class="price">&yen; 130.00</p>
<h3 class="title">{{product_name}}</h3>
<p class="price">&yen; {{sales_price}}</p>
<p class="buy-now">立即购买></p>
</div>
</a>
</li>
{{/list}}
</ul>
</div>
</div>
\ No newline at end of file
</div>
{{/data}}
\ No newline at end of file
... ...
... ... @@ -261,6 +261,7 @@ var checkShop = function() {
}
});
}
checkShop();
// 店铺推荐收藏
require('./maybe-like')();
... ...
... ... @@ -75,8 +75,8 @@ module.exports = (list) => {
floor.data.length === 1 &&
(floor.singleOne = true);
// vip专享
if (floor.vipUse && floor.data && floor.data.background) {
// vip专享 人气单品背景处理
if ((floor.vipUse || floor.popularSingleProduct || floor.newUserFloor) && floor.data && floor.data.background) {
let a = floor.data.background.src;
a = a.substr(0, a.indexOf('?'));
floor.data.background.src = a;
... ...