Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yohobuywap-node
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
zzzzzzz
2016-11-03 14:03:55 +0800
Commit
9e83069597bfdfd17c074014f460d6a1c1428044
1 parent
979b5d9f
新人专享,人气单品
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
59 additions
and
65 deletions
apps/channel/models/channel.js
apps/channel/views/partial/channel/content.hbs
doraemon/views/partial/resources/hot-single.hbs
doraemon/views/partial/resources/new-user-floor.hbs
public/js/channel/home.page.js
utils/resources-process.js
apps/channel/models/channel.js
View file @
9e83069
...
...
@@ -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
,
};
...
...
apps/channel/views/partial/channel/content.hbs
View file @
9e83069
...
...
@@ -53,7 +53,7 @@
{{>
resources
/
plus-star
}}
{{/if}}
{{! 新人专享}}
{{#if
n
ewUserFloor
}}
{{#if
oldN
ewUserFloor
}}
{{>
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
}}
...
...
doraemon/views/partial/resources/hot-single.hbs
View file @
9e83069
{{#
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"
>
¥
188.00
</h3>
<p
class=
"view-num"
>
12人
</p>
<h3
class=
"price"
>
¥
{{
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">¥ 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
...
...
doraemon/views/partial/resources/new-user-floor.hbs
View file @
9e83069
{{#
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"
>
¥
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"
>
¥
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"
>
¥
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"
>
¥
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"
>
¥
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"
>
¥
130.00
</p>
<h3
class=
"title"
>
{{
product_name
}}
</h3>
<p
class=
"price"
>
¥
{{
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
...
...
public/js/channel/home.page.js
View file @
9e83069
...
...
@@ -261,6 +261,7 @@ var checkShop = function() {
}
});
}
checkShop
();
// 店铺推荐收藏
require
(
'./maybe-like'
)();
...
...
utils/resources-process.js
View file @
9e83069
...
...
@@ -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
;
...
...
Please
register
or
login
to post a comment