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
Plain Diff
Browse Files
Authored by
QC-L
6 years ago
Commit
8a28815e684dd4f5159e7d5de9394ecac1a035f0
2 parents
2588920d
e4f93be0
Merge branch 'release/6.9.4' into feature/home-optimization
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
661 additions
and
201 deletions
apps/activity/models/feature.js
apps/activity/views/action/feature/index.hbs
apps/activity/views/partial/feature/product-item-1.hbs
apps/activity/views/partial/feature/product-item-2.hbs
apps/activity/views/partial/feature/product-style-1.hbs
apps/activity/views/partial/feature/product-style-2.hbs
apps/api/controllers/pwa.js
package.json
public/js/activity/feature.page.js
public/scss/feature/anchor.scss
public/scss/feature/product.scss
utils/helpers.js
apps/activity/models/feature.js
View file @
8a28815
...
...
@@ -65,9 +65,9 @@ class featureModel extends global.yoho.BaseModel {
};
if
(
val
.
shop_id
)
{
obj
.
brandurl
=
`
//m.yohobuy.com/product/
shop
?domain=${val.brand_domain}&openby:yohobuy={"action":"go.shop","params":{"shop_id":${val.shop_id},"shop_template_type":${val.shop_template_type || "1"},"is_red_shop":${val.is_red_shop || 1}}}`; // eslint-disable-line
obj
.
brandurl
=
`
//m.yohobuy.com/product/
index/brand
?domain=${val.brand_domain}&openby:yohobuy={"action":"go.shop","params":{"shop_id":${val.shop_id},"shop_template_type":${val.shop_template_type || "1"},"is_red_shop":${val.is_red_shop || 1}}}`; // eslint-disable-line
}
else
{
obj
.
brandurl
=
`
//m.yohobuy.com/product/
shop
?domain=${val.brand_domain}&openby:yohobuy={"action":"go.brand","params":{"brand_id":${val.brand_id}}}`; // eslint-disable-line
obj
.
brandurl
=
`
//m.yohobuy.com/product/
index/brand
?domain=${val.brand_domain}&openby:yohobuy={"action":"go.brand","params":{"brand_id":${val.brand_id}}}`; // eslint-disable-line
}
resList
[
val
.
product_skn
]
=
obj
;
...
...
@@ -93,7 +93,11 @@ class featureModel extends global.yoho.BaseModel {
showBrandUrl
:
value
.
showBrandUrl
,
isAdvance
:
value
.
isAdvance
,
advanceBgImg
:
value
.
advanceBgImg
,
leftDownImg
:
value
.
leftDownImg
leftDownImg
:
value
.
leftDownImg
,
priceBgImage
:
value
.
priceBgImage
,
shopBgImage
:
value
.
shopBgImage
,
enterShopBgImage
:
value
.
enterShopBgImage
,
brandColor
:
value
.
brandColor
};
value
.
_defaultSkns
&&
value
.
_defaultSkns
.
forEach
(
val
=>
{
...
...
@@ -338,7 +342,7 @@ class featureModel extends global.yoho.BaseModel {
componentArr
.
push
(
f
.
component
[
0
]);
f
.
component
[
0
].
newStyle
=
_
.
get
(
f
,
'component[0].newStyle'
)
===
'1'
;
f
.
component
[
0
].
newStyle
=
_
.
get
(
f
,
'component[0].newStyle'
);
}
if
(
f
.
component
&&
f
.
component
[
0
]
&&
...
...
@@ -348,7 +352,7 @@ class featureModel extends global.yoho.BaseModel {
limit
:
'60'
},
f
.
component
[
0
].
searchCondition
||
{});
f
.
component
[
0
].
newStyle
=
_
.
get
(
f
,
'component[0].newStyle'
)
===
'1'
;
f
.
component
[
0
].
newStyle
=
_
.
get
(
f
,
'component[0].newStyle'
);
}
...
...
apps/activity/views/action/feature/index.hbs
View file @
8a28815
...
...
@@ -4,204 +4,258 @@
<p>
此活动已结束
</p>
<p>
稍后自动跳转更多其他精彩活动...
</p>
</div>
{{else}}
{{#
content
.
webShare
}}
<input
id=
"shareLink"
type=
"hidden"
value=
"
{{
url
}}
"
>
<input
id=
"shareDesc"
type=
"hidden"
value=
"
{{
content
}}
"
>
<input
id=
"shareImg"
type=
"hidden"
value=
"
{{
pic
}}
"
>
<input
id=
"shareTitle"
type=
"hidden"
value=
"
{{
title
}}
"
>
{{/
content
.
webShare
}}
{{#
content
.
floors
}}
{{#
isEqualOr
type
'sidebar'
}}
{{! 侧悬浮}}
{{#
isEqualOr
param
.
linkTarget
'1'
'3'
}}
<a
href=
"
{{
param
.
sidebarPageId
}}
"
class=
"sidebar-link"
target=
"_blank"
>
<img
src=
"
{{
imageslim
param
.
icon
}}
"
>
</a>
{{/
isEqualOr
}}
{{#
isEqualOr
param
.
linkTarget
'2'
}}
<div
id=
"sidebar"
pageid=
"
{{
param
.
sidebarPageId
}}
"
>
<img
src=
"
{{
imageslim
param
.
icon
}}
"
>
</div>
{{/
isEqualOr
}}
{{else}}
{{#
content
.
webShare
}}
<input
id=
"shareLink"
type=
"hidden"
value=
"
{{
url
}}
"
>
<input
id=
"shareDesc"
type=
"hidden"
value=
"
{{
content
}}
"
>
<input
id=
"shareImg"
type=
"hidden"
value=
"
{{
pic
}}
"
>
<input
id=
"shareTitle"
type=
"hidden"
value=
"
{{
title
}}
"
>
{{/
content
.
webShare
}}
{{#
content
.
floors
}}
{{#
isEqualOr
type
'sidebar'
}}
{{! 侧悬浮}}
{{#
isEqualOr
param
.
linkTarget
'1'
'3'
}}
<a
href=
"
{{
param
.
sidebarPageId
}}
"
class=
"sidebar-link"
target=
"_blank"
>
<img
src=
"
{{
imageslim
param
.
icon
}}
"
>
</a>
{{/
isEqualOr
}}
{{#
isEqualOr
type
''
'common_floor'
'fix'
}}
{{! 普通楼层 顶悬浮}}
<div
{{#if
param
.
anchorname
}}
id=
"
{{
param
.
anchorname
}}
"
{{/if}}
{{#if
param
.
tabname
}}
tabname=
"
{{
param
.
tabname
}}
"
{{/if}}
{{#if
id
}}
data-id=
"
{{
id
}}
"
{{/if}}
class=
"floor clearfix
{{
type
}}
{{#if
hide
}}
hide
{{/if}}
"
style=
"
{{#if
param
.
bgcolor
}}
background-color:
{{
param
.
bgcolor
}}
;
{{/if}}{{#if
param
.
_bgimgFill
}}
background-image: url(
{{
imageslim
param
.
_bgimgFill
}}
);
{{/if}}
"
>
{{#if
param
.
bgimg
}}
{{#
isLazyLoad
type
@index
}}
<img
class=
"lazy"
data-original=
"
{{
imageslim
param
.
bgimg
}}
"
>
{{#
isEqualOr
param
.
linkTarget
'2'
}}
<div
id=
"sidebar"
pageid=
"
{{
param
.
sidebarPageId
}}
"
>
<img
src=
"
{{
imageslim
param
.
icon
}}
"
>
</div>
{{/
isEqualOr
}}
{{/
isEqualOr
}}
{{#
isEqualOr
type
''
'common_floor'
'fix'
}}
{{! 普通楼层 顶悬浮}}
<div
{{#if
param
.
anchorname
}}
id=
"
{{
param
.
anchorname
}}
"
{{/if}}
{{#if
param
.
tabname
}}
tabname=
"
{{
param
.
tabname
}}
"
{{/if}}
{{#if
id
}}
data-id=
"
{{
id
}}
"
{{/if}}
class=
"floor clearfix
{{
type
}}
{{#if
hide
}}
hide
{{/if}}
"
style=
"
{{#if
param
.
bgcolor
}}
background-color:
{{
param
.
bgcolor
}}
;
{{/if}}{{#if
param
.
_bgimgFill
}}
background-image: url(
{{
imageslim
param
.
_bgimgFill
}}
);
{{/if}}
"
>
{{#if
param
.
bgimg
}}
{{#
isLazyLoad
type
@index
}}
<img
class=
"lazy"
data-original=
"
{{
imageslim
param
.
bgimg
}}
"
>
{{else}}
<img
src=
"
{{
imageslim
param
.
bgimg
}}
"
>
{{/
isLazyLoad
}}
{{/if}}
{{#
component
}}
{{#
isEqualOr
type
'link'
}}
{{! 普通组件}}
<a
class=
"anchor
{{#if
modalImg
}}
modalimg
{{/if}}
"
style=
"
{{
styleFormat
this
percent
=
1
}}
"
href=
"
{{#if
url
}}{{
url
}}{{else}}
javascript:void(0);
{{/if}}
"
{{#
isEqualOr
linkTarget
'3'
}}
target=
"_blank"
{{/
isEqualOr
}}
fp=
"
{{
getAnalysis
..
/
this
@index
}}
"
></a>
{{#if
modalImg
}}
<div
class=
"modal"
>
<span
class=
"modal-close"
></span>
<img
class=
"modal-img lazy"
data-original=
"
{{
imageslim
modalImg
}}
"
>
</div>
{{/if}}
{{/
isEqualOr
}}
{{/
isLazyLoad
}}
{{/if}}
{{#
component
}}
{{#
isEqualOr
type
'link'
}}
{{! 普通组件}}
<a
class=
"anchor
{{#if
modalImg
}}
modalimg
{{/if}}
"
style=
"
{{
styleFormat
this
percent
=
1
}}
"
href=
"
{{#if
url
}}{{
url
}}{{else}}
javascript:void(0);
{{/if}}
"
{{#
isEqualOr
linkTarget
'3'
}}
target=
"_blank"
{{/
isEqualOr
}}
fp=
"
{{
getAnalysis
..
/
this
@index
}}
"
></a>
{{#if
modalImg
}}
<div
class=
"modal"
>
<span
class=
"modal-close"
></span>
<img
class=
"modal-img lazy"
data-original=
"
{{
imageslim
modalImg
}}
"
>
</div>
{{/if}}
{{/
isEqualOr
}}
{{#
isEqualOr
type
'coupon'
}}
{{! 优惠券}}
<a
class=
"anchor yoho-conpon"
style=
"
{{
styleFormat
this
percent
=
1
}}
"
data-persenal-enable=
"
{{
persenal_enable
}}
"
data-token=
"
{{
token
}}
"
href=
"
{{#if
url
}}{{
url
}}{{else}}
javascript:void(0);
{{/if}}
"
fp=
"
{{
getAnalysis
..
/
this
@index
}}
"
></a>
{{/
isEqualOr
}}
{{#
isEqualOr
type
'coupon'
}}
{{! 优惠券}}
<a
class=
"anchor yoho-conpon"
style=
"
{{
styleFormat
this
percent
=
1
}}
"
data-persenal-enable=
"
{{
persenal_enable
}}
"
data-token=
"
{{
token
}}
"
href=
"
{{#if
url
}}{{
url
}}{{else}}
javascript:void(0);
{{/if}}
"
fp=
"
{{
getAnalysis
..
/
this
@index
}}
"
></a>
{{/
isEqualOr
}}
{{#
isEqualOr
type
'yohoCoin'
}}
{{! 有货币}}
<a
class=
"anchor yoho-coin"
style=
"
{{
styleFormat
this
percent
=
1
}}
"
data-token=
"
{{
token
}}
"
href=
"
{{#if
url
}}{{
url
}}{{else}}
javascript:void(0);
{{/if}}
"
fp=
"
{{
getAnalysis
..
/
this
@index
}}
"
></a>
{{/
isEqualOr
}}
{{#
isEqualOr
type
'yohoCoin'
}}
{{! 有货币}}
<a
class=
"anchor yoho-coin"
style=
"
{{
styleFormat
this
percent
=
1
}}
"
data-token=
"
{{
token
}}
"
href=
"
{{#if
url
}}{{
url
}}{{else}}
javascript:void(0);
{{/if}}
"
fp=
"
{{
getAnalysis
..
/
this
@index
}}
"
></a>
{{/
isEqualOr
}}
{{#
isEqualOr
type
'video'
}}
{{! 视频}}
<a
class=
"anchor video-bg"
style=
"
{{
styleFormat
this
percent
=
1
}}
"
href=
"
{{#if
url
}}{{
url
}}{{else}}
javascript:void(0);
{{/if}}
"
fp=
"
{{
getAnalysis
..
/
this
@index
}}
"
></a>
<div
class=
"video-android-close hide"
></div>
<div
class=
"video-android-bg hide"
></div>
<video
class=
"video"
controls
loop
preload=
"meta"
name=
"media"
>
<source
src=
"
{{
videoSrc
}}
"
>
</video>
{{/
isEqualOr
}}
{{#
isEqualOr
type
'video'
}}
{{! 视频}}
<a
class=
"anchor video-bg"
style=
"
{{
styleFormat
this
percent
=
1
}}
"
href=
"
{{#if
url
}}{{
url
}}{{else}}
javascript:void(0);
{{/if}}
"
fp=
"
{{
getAnalysis
..
/
this
@index
}}
"
></a>
<div
class=
"video-android-close hide"
></div>
<div
class=
"video-android-bg hide"
></div>
<video
class=
"video"
controls
loop
preload=
"meta"
name=
"media"
>
<source
src=
"
{{
videoSrc
}}
"
>
</video>
{{/
isEqualOr
}}
{{#
isEqualOr
type
'marquee'
'swiper'
}}
{{! 轮播/滑动}}
<div
class=
"swiper-container
{{
type
}}
"
data-loop=
"
{{
loop
}}
"
{{#if
spaceBetween
}}
data-spacebetween=
"
{{
spaceBetween
}}
"
{{/if}}
{{#if
autoplay
}}
data-autoplay=
"
{{
autoplay
}}
"
{{/if}}
>
<div
class=
"swiper-wrapper"
>
{{#
list
}}
<div
class=
"swiper-slide"
style=
"
{{
styleFormat
this
percent
=
1
}}
"
>
<img
src=
"
{{
imageslim
src
}}
"
>
<a
class=
"anchor"
href=
"
{{#if
link
}}{{
link
}}{{else}}
javascript:void(0);
{{/if}}
"
fp=
"
{{
getAnalysis
..
/
..
/
this
@index
}}
"
></a>
</div>
{{/
list
}}
</div>
{{#
isEqualOr
type
'marquee'
}}
<div
class=
"swiper-pagination"
></div>
{{/
isEqualOr
}}
{{#
isEqualOr
type
'marquee'
'swiper'
}}
{{! 轮播/滑动}}
<div
class=
"swiper-container
{{
type
}}
"
data-loop=
"
{{
loop
}}
"
{{#if
spaceBetween
}}
data-spacebetween=
"
{{
spaceBetween
}}
"
{{/if}}
{{#if
autoplay
}}
data-autoplay=
"
{{
autoplay
}}
"
{{/if}}
>
<div
class=
"swiper-wrapper"
>
{{#
list
}}
<div
class=
"swiper-slide"
style=
"
{{
styleFormat
this
percent
=
1
}}
"
>
<img
src=
"
{{
imageslim
src
}}
"
>
<a
class=
"anchor"
href=
"
{{#if
link
}}{{
link
}}{{else}}
javascript:void(0);
{{/if}}
"
fp=
"
{{
getAnalysis
..
/
..
/
this
@index
}}
"
></a>
</div>
{{/
list
}}
</div>
{{/
isEqualOr
}}
{{#
isEqualOr
type
'marquee'
}}
<div
class=
"swiper-pagination"
></div>
{{/
isEqualOr
}}
</div>
{{/
isEqualOr
}}
{{#
isEqualOr
type
'tab'
}}
{{! tab}}
<div
class=
"tab-container"
>
{{#
repeat
count
}}
<a
class=
"anchor
{{#if
@first
}}
active
{{/if}}
"
tab=
{{
tabName
@index
..
/
tabnames
}}
style="
{{
tabStyle
@index
..
/
count
}}
"
></a>
{{/
repeat
}}
</div>
{{/
isEqualOr
}}
{{#
isEqualOr
type
'tab'
}}
{{! tab}}
<div
class=
"tab-container
{{#
isEqualOr
topFloat
'1'
}}
tab-fix
{{/
isEqualOr
}}
"
>
{{#
list
}}
<a
class=
"anchor
{{#
isEqualOr
..
/
chooseTab
link
}}
active
{{/
isEqualOr
}}
"
tab=
{{
link
}}
style="
{{
tabStyle
@index
..
/
num
}}
"
>
<img
src=
"
{{
src
}}
"
style=
"
{{#
isEqualOr
..
/
chooseTab
link
}}
{{^}}
display: none;
{{/
isEqualOr
}}
"
alt=
""
>
</a>
{{/
list
}}
</div>
{{/
isEqualOr
}}
{{#
isEqualOr
type
'shopGroup'
}}
{{!-- 店铺组 --}}
{{#if
individuation
}}
<div
class=
"shop-individuation"
data-config=
"
{{
stringify
this
}}
"
></div>
{{else}}
{{#
isEqualOr
type
'shopGroup'
}}
{{!-- 店铺组 --}}
{{#if
individuation
}}
<div
class=
"shop-individuation"
data-config=
"
{{
stringify
this
}}
"
></div>
{{else}}
{{>
feature
/
shop-group
}}
{{/if}}
{{/
isEqualOr
}}
{{/if}}
{{/
isEqualOr
}}
{{#
isEqualOr
type
'shopAndProduct'
}}
<!--一个店铺带两个商品-->
<div
class=
"shop-product-container
{{#
isEqualOr
position
'1'
}}
right
{{^}}
left
{{/
isEqualOr
}}
"
id=
"s_p_
{{
shopId
}}
"
data-shopId=
"
{{
shopId
}}
"
>
<div
class=
"product-container single-item3
{{#
isEqualOr
position
'1'
}}
right
{{^}}
left
{{/
isEqualOr
}}
shop-wrapper"
>
<a
class=
"shop-container"
href=
"
{{
jumpUrl
}}
"
target=
"_blank"
>
<div
class=
"feature-shop-info"
>
<image
src=
"
{{
image2
shopBgImage
w
=
213
h
=
224
q
=
80
}}
"
></image>
</div>
</a>
</div>
<div
class=
"product-wrapper"
>
{{#
isEqualOr
newStyle
'1'
}}
{{>
feature
/
product-new-style
}}
{{^}}
{{>
feature
/
product-old-style
}}
{{/
isEqualOr
}}
</div>
<div
class=
"clearfix"
></div>
{{#
isEqualOr
type
'shopAndProduct'
}}
<!--一个店铺带两个商品-->
<div
class=
"shop-product-container
{{#
isEqualOr
position
'1'
}}
right
{{^}}
left
{{/
isEqualOr
}}
"
id=
"s_p_
{{
shopId
}}
"
data-shopId=
"
{{
shopId
}}
"
>
<div
class=
"product-container single-item3
{{#
isEqualOr
position
'1'
}}
right
{{^}}
left
{{/
isEqualOr
}}
shop-wrapper"
>
<a
class=
"shop-container"
href=
"
{{
jumpUrl
}}
"
target=
"_blank"
>
<div
class=
"feature-shop-info"
>
<img
src=
"
{{
image2
shopBgImage
w
=
213
h
=
224
q
=
80
}}
"
/>
</div>
</a>
</div>
<div
class=
"product-wrapper"
>
{{#
isEqualOr
newStyle
'0'
}}
{{>
feature
/
product-old-style
}}
{{/
isEqualOr
}}
{{#
isEqualOr
newStyle
'1'
}}
{{>
feature
/
product-new-style
}}
{{/
isEqualOr
}}
{{/
isEqualOr
}}
{{#
isEqualOr
newStyle
'2'
}}
{{>
feature
/
product-old-style
}}
{{/
isEqualOr
}}
{{#
isEqualOr
type
'productGroup'
}}
{{! 商品池}}
{{#
isEqualOr
newStyle
'1'
}}
{{>
feature
/
product-new-style
}}
{{^}}
{{>
feature
/
product-old-style
}}
{{/
isEqualOr
}}
{{/
isEqualOr
}}
{{#
isEqualOr
newStyle
'3'
}}
{{!618 商品和品牌}}
{{>
feature
/
product-style-1
}}
{{/
isEqualOr
}}
{{#
isEqualOr
type
'collageSkns'
}}
{{! 拼团}}
{{>
feature
/
swiper-product-collage
}}
{{/
isEqualOr
}}
{{#
isEqualOr
type
'shop'
}}
{{! 店铺}}
<div
class=
"product-container single-item3"
>
<a
class=
"shop-container"
href=
"
{{
jumpUrl
}}
"
>
<div
class=
"feature-shop-info"
>
<image
class=
"lazy"
data-original=
"
{{
image2
shopImge
q
=
80
}}
"
></image>
</div>
</a>
{{#
isEqualOr
newStyle
'4'
}}
{{!618 商品和店铺}}
{{>
feature
/
product-style-2
}}
{{/
isEqualOr
}}
</div>
{{/
isEqualOr
}}
<div
class=
"clearfix"
></div>
</div>
{{#
isEqualOr
type
'skn'
}}
{{! 商品}}
{{#
defaultPros
}}
<div
class=
"product-container single-item3"
>
{{#
isEqualOr
..
/
newStyle
'1'
}}
{{>
feature
/
product-new-item
}}
{{^}}
{{>
feature
/
product-old-item
}}
{{/
isEqualOr
}}
</div>
{{/
defaultPros
}}
{{/
isEqualOr
}}
{{#
isEqualOr
type
'swiperSkns'
}}
{{! 商品侧滑组}}
{{>
feature
/
swiper-product
}}
{{/
isEqualOr
}}
{{/
isEqualOr
}}
{{#
isEqualOr
type
'cutPriceSkn'
}}
{{! 阶梯降价}}
{{>
feature
/
timed-cut-product
}}
{{#
isEqualOr
type
'productGroup'
}}
{{! 商品池}}
{{#
isEqualOr
newStyle
'0'
}}
{{>
feature
/
product-old-style
}}
{{/
isEqualOr
}}
{{#
isEqualOr
type
'redPacket'
}}
{{! 红包领取}}
{{>
feature
/
red-packet
}}
{{#
isEqualOr
newStyle
'1'
}}
{{>
feature
/
product-new-style
}}
{{/
isEqualOr
}}
{{#
isEqualOr
type
'likedActivity'
}}
{{! 点赞楼层}}
{{>
feature
/
liked-activity
}}
{{#
isEqualOr
newStyle
'2'
}}
{{>
feature
/
product-old-style
}}
{{/
isEqualOr
}}
{{#
isEqualOr
type
'textEdit'
}}
{{! 文本}}
{{>
feature
/
text-edit
}}
{{#
isEqualOr
newStyle
'3'
}}
{{!618 商品和品牌}}
{{>
feature
/
product-style-1
}}
{{/
isEqualOr
}}
{{#
isEqualOr
type
'SecKill'
}}
{{! 秒杀}}
{{>
feature
/
seckill
}}
{{#
isEqualOr
newStyle
'4'
}}
{{!618 商品和店铺}}
{{>
feature
/
product-style-2
}}
{{/
isEqualOr
}}
{{/
component
}}
</div>
{{/
isEqualOr
}}
{{#
isEqualOr
type
'bottombar'
}}
<div
class=
"floor common_floor"
style=
"width:100%;height:
{{
height
}}
rem"
></div>
{{>
feature
/
bottom-fix
}}
{{/
isEqualOr
}}
{{/
content
.
floors
}}
<input
type=
"hidden"
value=
"
{{
content
.
atlBo
}}
"
class=
"activity-plan"
>
<input
type=
"hidden"
value=
"
{{
content
.
templateId
}}
"
class=
"template-id"
>
{{/
isEqualOr
}}
{{#
isEqualOr
type
'collageSkns'
}}
{{! 拼团}}
{{>
feature
/
swiper-product-collage
}}
{{/
isEqualOr
}}
{{#
isEqualOr
type
'shop'
}}
{{! 店铺}}
<div
class=
"product-container single-item3"
>
<a
class=
"shop-container"
href=
"
{{
jumpUrl
}}
"
>
<div
class=
"feature-shop-info"
>
<image
class=
"lazy"
data-original=
"
{{
image2
shopImge
q
=
80
}}
"
></image>
</div>
</a>
</div>
{{/
isEqualOr
}}
{{#
isEqualOr
type
'skn'
}}
{{! 商品}}
{{#
defaultPros
}}
<div
class=
"product-container single-item3"
>
{{#
isEqualOr
..
/
newStyle
'1'
}}
{{>
feature
/
product-new-item
}}
{{^}}
{{>
feature
/
product-old-item
}}
{{/
isEqualOr
}}
</div>
{{/
defaultPros
}}
{{/
isEqualOr
}}
{{#
isEqualOr
type
'swiperSkns'
}}
{{! 商品侧滑组}}
{{>
feature
/
swiper-product
}}
{{/
isEqualOr
}}
{{#
isEqualOr
type
'cutPriceSkn'
}}
{{! 阶梯降价}}
{{>
feature
/
timed-cut-product
}}
{{/
isEqualOr
}}
{{#
isEqualOr
type
'redPacket'
}}
{{! 红包领取}}
{{>
feature
/
red-packet
}}
{{/
isEqualOr
}}
{{#
isEqualOr
type
'likedActivity'
}}
{{! 点赞楼层}}
{{>
feature
/
liked-activity
}}
{{/
isEqualOr
}}
{{#
isEqualOr
type
'textEdit'
}}
{{! 文本}}
{{>
feature
/
text-edit
}}
{{/
isEqualOr
}}
{{#
isEqualOr
type
'SecKill'
}}
{{! 秒杀}}
{{>
feature
/
seckill
}}
{{/
isEqualOr
}}
{{/
component
}}
</div>
{{/
isEqualOr
}}
{{#
isEqualOr
type
'bottombar'
}}
<div
class=
"floor common_floor"
style=
"width:100%;height:
{{
height
}}
rem"
></div>
{{>
feature
/
bottom-fix
}}
{{/
isEqualOr
}}
{{/
content
.
floors
}}
<input
type=
"hidden"
value=
"
{{
content
.
atlBo
}}
"
class=
"activity-plan"
>
<input
type=
"hidden"
value=
"
{{
content
.
templateId
}}
"
class=
"template-id"
>
{{/
unless
}}
</div>
...
...
apps/activity/views/partial/feature/product-item-1.hbs
0 → 100644
View file @
8a28815
<div
class=
"feature-product-info
{{#if
conf
.
searchCondition
}}
novisible
{{/if}}
"
data-skn=
"
{{
product_skn
}}
"
>
<a
class=
"first-part product-detail"
href=
'
{{
producturl
}}
'
>
<div
class=
"product-detail-imgbox"
>
{{#if
conf
.
lefTopImg
}}
<img
class=
"leftopimg lazy"
data-original=
"
{{
image2
conf
.
lefTopImg
q
=
85
}}
"
style=
"width: auto;"
>
{{/if}}
{{#if
conf
.
rigTopImg
}}
<img
class=
"rigtopimg lazy"
data-original=
"
{{
image2
conf
.
rigTopImg
q
=
85
}}
"
style=
"width: auto;"
>
{{/if}}
<img
class=
"product-detail-img product-detail-img-new lazy"
data-original=
"
{{
image2
productimg
q
=
85
}}
"
>
<a
class=
"new-brand-name
{{#
isEqualOr
conf
.
showBrandUrl
'1'
}}
product-brand
{{else}}
product-detail
{{/
isEqualOr
}}
"
style=
"
{{#if
conf
.
brandColor
}}
background-color:
{{
conf
.
brandColor
}}
;
{{/if}}
"
href=
"
{{
brandurl
}}
"
>
<span
class=
"brand-name"
{{#if
conf
.
fontColor
}}
style=
"color:
{{
conf
.
fontColor
}}
;"
{{/if}}
>
{{
brandname
}}
</span>
</a>
<div
class=
"sales-imgs-new"
>
{{#
isEqualOr
conf
.
isAdvance
'1'
}}
<div
class=
"advance"
style=
"background-image: url(
{{
imageslim
conf
.
advanceBgImg
}}
);display:inline-block;"
>
<img
src=
"
{{
imageslim
conf
.
advanceBgImg
}}
"
class=
"img-seat"
>
<span
class=
"advance-price"
>
¥
{{
curPlanPrice
}}
</span>
</div>
{{/
isEqualOr
}}
{{#if
conf
.
leftDownImg
}}
<img
class=
"leftdownimg lazy"
data-original=
"
{{
image2
conf
.
leftDownImg
q
=
85
}}
"
>
{{/if}}
</div>
</div>
</a>
{{#if
conf
.
priceBgImage
}}
<a
class=
"second-part"
>
<div
class=
"new-brand-div"
style=
"top: 0;"
>
{{#
isEqualOr
conf
.
showSalePrice
'1'
}}
<div
class=
"new-price"
style=
"
{{#if
conf
.
salePriceBgColor
}}
background:
{{
conf
.
salePriceBgColor
}}
;
{{/if}}{{#if
conf
.
priceFontColor
}}
color:
{{
conf
.
priceFontColor
}}
;
{{/if}}
; text-align: left;"
>
<span
class=
"sale-price"
{{#if
conf
.
priceFontColor
}}
style=
"color:
{{
conf
.
priceFontColor
}}
;"
{{/if}}
>
¥
{{
saleprice
}}
</span>
{{#if
marketprice
}}
<span
class=
"market-price"
{{#if
conf
.
priceFontColor
}}
style=
"color:
{{
conf
.
priceFontColor
}}
;"
{{/if}}
>
¥
{{
marketprice
}}
</span>
{{/if}}
</div>
{{/
isEqualOr
}}
</div>
<img
class=
"price-img"
src=
"
{{
image2
conf
.
priceBgImage
q
=
85
}}
"
>
</a>
{{/if}}
</div>
...
...
apps/activity/views/partial/feature/product-item-2.hbs
0 → 100644
View file @
8a28815
<div
class=
"feature-product-info
{{#if
conf
.
searchCondition
}}
novisible
{{/if}}
"
data-skn=
"
{{
product_skn
}}
"
>
<a
class=
"first-part product-detail"
href=
'
{{
producturl
}}
'
>
<div
class=
"product-detail-imgbox"
>
{{#if
conf
.
lefTopImg
}}
<img
class=
"leftopimg lazy"
data-original=
"
{{
image2
conf
.
lefTopImg
q
=
85
}}
"
style=
"width: auto;"
>
{{/if}}
{{#if
conf
.
rigTopImg
}}
<img
class=
"rigtopimg lazy"
data-original=
"
{{
image2
conf
.
rigTopImg
q
=
85
}}
"
style=
"width: auto;"
>
{{/if}}
<img
class=
"product-detail-img product-detail-img-new lazy"
data-original=
"
{{
image2
productimg
q
=
85
}}
"
>
{{#if
conf
.
priceBgImage
}}
<a
class=
"second-part"
style=
"position: absolute; bottom: 0; left: 0; right: 0;"
>
<div
class=
"new-brand-div"
style=
"top: 0;"
>
{{#
isEqualOr
conf
.
showSalePrice
'1'
}}
<div
class=
"new-price"
style=
"
{{#if
conf
.
salePriceBgColor
}}
background:
{{
conf
.
salePriceBgColor
}}
;
{{/if}}{{#if
conf
.
priceFontColor
}}
color:
{{
conf
.
priceFontColor
}}
;
{{/if}}
; text-align: left;"
>
<span
class=
"sale-price"
{{#if
conf
.
priceFontColor
}}
style=
"color:
{{
conf
.
priceFontColor
}}
;"
{{/if}}
>
¥
{{
saleprice
}}
</span>
{{#if
marketprice
}}
<span
class=
"market-price"
{{#if
conf
.
priceFontColor
}}
style=
"color:
{{
conf
.
priceFontColor
}}
;"
{{/if}}
>
¥
{{
marketprice
}}
</span>
{{/if}}
</div>
{{/
isEqualOr
}}
</div>
<img
class=
"price-img"
src=
"
{{
image2
conf
.
priceBgImage
q
=
85
}}
"
>
</a>
{{/if}}
<div
class=
"sales-imgs-new"
>
{{#
isEqualOr
conf
.
isAdvance
'1'
}}
<div
class=
"advance"
style=
"background-image: url(
{{
imageslim
conf
.
advanceBgImg
}}
);display:inline-block;"
>
<img
src=
"
{{
imageslim
conf
.
advanceBgImg
}}
"
class=
"img-seat"
>
<span
class=
"advance-price"
>
¥
{{
curPlanPrice
}}
</span>
</div>
{{/
isEqualOr
}}
{{#if
conf
.
leftDownImg
}}
<img
class=
"leftdownimg lazy"
data-original=
"
{{
image2
conf
.
leftDownImg
q
=
85
}}
"
>
{{/if}}
</div>
</div>
</a>
<a
class=
"new-brand-name
{{#
isEqualOr
conf
.
showBrandUrl
'1'
}}
product-brand
{{else}}
product-detail
{{/
isEqualOr
}}
"
style=
"position: relative; background-color: unset;padding-bottom: 0;padding-top:0;display: flex;align-items: center;"
href=
"
{{
brandurl
}}
"
>
<div
class=
"brand-name add-padding5"
{{#if
conf
.
fontColor
}}
style=
"position: absolute;color:
{{
conf
.
fontColor
}}
;padding-left: 0.3rem;"
{{/if}}
>
{{
brandname
}}
</div>
<img
class=
"price-img"
src=
"
{{
image2
conf
.
enterShopBgImage
q
=
85
}}
"
>
</a>
</div>
...
...
apps/activity/views/partial/feature/product-style-1.hbs
0 → 100644
View file @
8a28815
<div
class=
"product-container item
{{
numOfOneRow
}}
"
{{#if
proBgImg
}}
style=
"background:url(
{{
image2
proBgImg
q
=
85
}}
) repeat;background-size:100%;"
{{/if}}
>
<div
class=
"product-source"
condition=
'
{{
stringify
searchCondition
}}
'
fp=
"
{{
getAnalysis
..
/
this
@index
}}
"
data-rownum=
"
{{
numOfOneRow
}}
"
{{#
unless
defaultPros
.
length
}}
{{#if
searchCondition
.
item
}}
cloneitem=
"
{{
searchCondition
.
item
}}
"
{{else}}
cloneitem=
"
{{
searchCondition
.
limit
}}
"
{{/if}}
{{/
unless
}}
>
<input
class=
"imgwh"
type=
"hidden"
value=
"386x514"
>
{{#if
defaultPros
.
length
}}
{{#
defaultPros
}}
{{>
feature
/
product-item-1
}}
{{/
defaultPros
}}
{{else}}
<div
class=
"feature-product-info novisible"
data-skn=
"
{{
product_skn
}}
"
>
<a
class=
"first-part product-detail"
href=
"
{{
producturl
}}
"
>
<div
class=
"product-detail-imgbox"
>
{{#if
lefTopImg
}}
<img
class=
"leftopimg lazy"
data-original=
"
{{
image2
lefTopImg
q
=
85
}}
"
style=
"width: auto;"
>
{{/if}}
{{#if
rigTopImg
}}
<img
class=
"rigtopimg lazy"
data-original=
"
{{
image2
rigTopImg
q
=
85
}}
"
style=
"width: auto;"
>
{{/if}}
<img
class=
"product-detail-img product-detail-img-new lazy"
src=
""
>
<a
class=
"new-brand-name
{{#
isEqualOr
showBrandUrl
'1'
}}
product-brand
{{else}}
product-detail
{{/
isEqualOr
}}
"
style=
"
{{#if
brandColor
}}
background-color:
{{
brandColor
}}
;
{{/if}}
"
href=
""
>
<span
class=
"brand-name"
{{#if
fontColor
}}
style=
"color:
{{
fontColor
}}
;"
{{/if}}
></span>
</a>
<div
class=
"sales-imgs-new"
>
{{#
isEqualOr
isAdvance
'1'
}}
<div
class=
"advance"
style=
"background-image: url(
{{
imageslim
advanceBgImg
}}
);display: block;"
>
<img
src=
"
{{
imageslim
advanceBgImg
}}
"
class=
"img-seat"
>
<span
class=
"advance-price"
></span>
</div>
{{/
isEqualOr
}}
{{#if
leftDownImg
}}
<img
class=
"leftdownimg lazy"
data-original=
"
{{
image2
leftDownImg
q
=
85
}}
"
>
{{/if}}
</div>
</div>
</a>
{{#if
priceBgImage
}}
<a
class=
"second-part"
>
<div
class=
"new-brand-div"
style=
"top: 0;"
>
{{#
isEqualOr
showSalePrice
'1'
}}
<div
class=
"new-price"
style=
"text-align: left;"
>
<span
class=
"sale-price"
{{#if
priceFontColor
}}
style=
"color:
{{
priceFontColor
}}
;"
{{/if}}
></span>
<span
class=
"market-price"
{{#if
priceFontColor
}}
style=
"color:
{{
priceFontColor
}}
;"
{{/if}}
></span>
</div>
{{/
isEqualOr
}}
</div>
<img
class=
"price-img"
src=
"
{{
image2
priceBgImage
q
=
85
}}
"
>
</a>
{{/if}}
</div>
{{/if}}
</div>
</div>
...
...
apps/activity/views/partial/feature/product-style-2.hbs
0 → 100644
View file @
8a28815
<div
class=
"product-container item
{{
numOfOneRow
}}
"
{{#if
proBgImg
}}
style=
"background:url(
{{
image2
proBgImg
q
=
85
}}
) repeat;background-size:100%;"
{{/if}}
>
<div
class=
"product-source"
condition=
'
{{
stringify
searchCondition
}}
'
fp=
"
{{
getAnalysis
..
/
this
@index
}}
"
data-rownum=
"
{{
numOfOneRow
}}
"
{{#
unless
defaultPros
.
length
}}
{{#if
searchCondition
.
item
}}
cloneitem=
"
{{
searchCondition
.
item
}}
"
{{else}}
cloneitem=
"
{{
searchCondition
.
limit
}}
"
{{/if}}
{{/
unless
}}
>
<input
class=
"imgwh"
type=
"hidden"
value=
"386x514"
>
{{#if
defaultPros
.
length
}}
{{#
defaultPros
}}
{{>
feature
/
product-item-2
}}
{{/
defaultPros
}}
{{else}}
<div
class=
"feature-product-info novisible"
data-skn=
"
{{
product_skn
}}
"
>
<a
class=
"first-part product-detail"
href=
"
{{
producturl
}}
"
>
<div
class=
"product-detail-imgbox"
>
{{#if
lefTopImg
}}
<img
class=
"leftopimg lazy"
data-original=
"
{{
image2
lefTopImg
q
=
85
}}
"
style=
"width: auto;"
>
{{/if}}
{{#if
rigTopImg
}}
<img
class=
"rigtopimg lazy"
data-original=
"
{{
image2
rigTopImg
q
=
85
}}
"
style=
"width: auto;"
>
{{/if}}
<img
class=
"product-detail-img product-detail-img-new lazy"
src=
""
>
{{#if
priceBgImage
}}
<a
class=
"second-part"
style=
"position: absolute; bottom: 0; left: 0; right: 0;"
>
<div
class=
"new-brand-div"
style=
"top: 0;"
>
{{#
isEqualOr
showSalePrice
'1'
}}
<div
class=
"new-price"
style=
"
{{#if
salePriceBgColor
}}
background:
{{
salePriceBgColor
}}
;
{{/if}}
{{#if
priceFontColor
}}
color:
{{
priceFontColor
}}
;
{{/if}}
;text-align: left;"
>
<span
class=
"sale-price"
{{#if
priceFontColor
}}
style=
"color:
{{
priceFontColor
}}
;"
{{/if}}
>
¥
{{
saleprice
}}
</span>
{{#if
marketprice
}}
<span
class=
"market-price"
{{#if
priceFontColor
}}
style=
"color:
{{
priceFontColor
}}
;"
{{/if}}
>
¥
{{
marketprice
}}
</span>
{{/if}}
</div>
{{/
isEqualOr
}}
</div>
<img
class=
"price-img"
src=
"
{{
image2
priceBgImage
q
=
85
}}
"
>
</a>
{{/if}}
<div
class=
"sales-imgs-new"
>
{{#
isEqualOr
isAdvance
'1'
}}
<div
class=
"advance"
style=
"background-image: url(
{{
imageslim
advanceBgImg
}}
);display: block;"
>
<img
src=
"
{{
imageslim
advanceBgImg
}}
"
class=
"img-seat"
>
<span
class=
"advance-price"
></span>
</div>
{{/
isEqualOr
}}
{{#if
leftDownImg
}}
<img
class=
"leftdownimg lazy"
data-original=
"
{{
image2
leftDownImg
q
=
85
}}
"
>
{{/if}}
</div>
</div>
</a>
<a
class=
"new-brand-name
{{#
isEqualOr
showBrandUrl
'1'
}}
product-brand
{{else}}
product-detail
{{/
isEqualOr
}}
"
style=
"position: relative; background-color: unset;padding-bottom: 0;padding-top:0;display: flex;align-items: center;"
href=
"
{{
brandurl
}}
"
>
<div
class=
"brand-name add-padding5"
{{#if
fontColor
}}
style=
"position: absolute;color:
{{
conf
.
fontColor
}}
;padding-left: 0.3rem;"
{{/if}}
>
{{
brandname
}}
</div>
<img
class=
"price-img"
src=
"
{{
image2
enterShopBgImage
q
=
85
}}
"
>
</a>
</div>
{{/if}}
</div>
</div>
...
...
apps/api/controllers/pwa.js
View file @
8a28815
...
...
@@ -5,6 +5,9 @@ const config = global.yoho.config;
module
.
exports
=
{
sw
(
req
,
res
)
{
if
(
req
.
hostname
===
'activity.yoho.cn'
)
{
return
res
.
status
(
404
).
end
();
}
res
.
set
({
'Cache-Control'
:
'no-cache'
,
Pragma
:
'no-cache'
,
...
...
package.json
View file @
8a28815
{
"name"
:
"yohobuywap-node"
,
"version"
:
"6.9.
2-15
"
,
"version"
:
"6.9.
4-3
"
,
"private"
:
true
,
"description"
:
"A New Yohobuy Project With Express"
,
"repository"
:
{
...
...
public/js/activity/feature.page.js
View file @
8a28815
...
...
@@ -13,9 +13,7 @@ require('scss/feature.scss');
let
isAndroid
=
/
(
Android
)
/i
.
test
(
navigator
.
userAgent
);
let
isWechat
=
/micromessenger/i
.
test
(
navigator
.
userAgent
);
lazyLoad
(
$
(
'img.lazy'
),
{
q
:
85
});
function
swiperInit
()
{
$
(
'.swiper-container'
).
each
(
function
()
{
...
...
@@ -170,30 +168,145 @@ function videoInit() {
});
}
let
store
=
{
tab
:
{
tabs
:
[],
cloneTabs
:
[]
}
};
function
tabInit
()
{
$
(
'.tab-container'
).
each
(
function
()
{
var
tab
=
$
(
this
).
find
(
'a.anchor'
);
var
tabname
=
(
tab
.
attr
(
'tab'
)
||
''
).
split
(
'_'
)[
0
]
+
'_'
;
var
$this
=
$
(
this
);
var
tabs
=
$this
.
find
(
'a.anchor'
);
var
curTab
=
$this
.
find
(
'a.anchor.active'
).
attr
(
'tab'
);
tab
.
on
(
'click'
,
function
()
{
tab
.
removeClass
(
'active'
);
$
(
this
).
addClass
(
'active'
);
if
(
$this
.
hasClass
(
'tab-fix'
))
{
store
.
tab
.
tabs
=
tabs
;
}
let
index
=
$
(
this
).
index
()
+
1
;
let
tabnames
=
tabs
.
map
(
function
(
i
,
el
)
{
return
$
(
el
).
attr
(
'tab'
);
}).
get
();
// 初始化选择状态
$
(
'div[tabname]'
).
each
(
function
(
index
,
el
)
{
let
$el
=
$
(
el
);
let
tname
=
$el
.
attr
(
'tabname'
);
if
(
!
tabnames
.
includes
(
tname
))
{
return
;
}
if
(
$el
.
attr
(
'tabname'
)
===
curTab
)
{
$el
.
show
();
}
else
{
$el
.
hide
();
}
});
// 绑定单击事件
tabs
.
on
(
'click'
,
function
()
{
var
tab
=
$
(
this
);
var
tabname
=
tab
.
attr
(
'tab'
);
if
(
tab
.
hasClass
(
'active'
))
{
return
;
}
for
(
let
i
=
1
;
i
<=
tab
.
length
;
i
++
)
{
if
(
index
===
i
)
{
$
(
'div[tabname="'
+
tabname
+
i
+
'"]'
).
show
();
tab
.
toggleClass
(
'active'
);
tab
.
find
(
'img'
).
show
();
tab
.
siblings
(
'a.anchor'
).
removeClass
(
'active'
);
tab
.
siblings
(
'a.anchor'
).
find
(
'img'
).
hide
();
$
(
'div[tabname]'
).
each
(
function
(
index
,
el
)
{
let
$el
=
$
(
el
);
let
tname
=
$el
.
attr
(
'tabname'
);
if
(
!
tabnames
.
includes
(
tname
))
{
return
;
}
if
(
tname
===
tabname
)
{
$el
.
show
();
}
else
{
$
(
'div[tabname="'
+
tabname
+
i
+
'"]'
)
.
hide
();
$
el
.
hide
();
}
});
});
});
}
function
tabFixInit
()
{
let
tabNavFix
=
$
(
'.tab-fix'
).
parent
();
let
curTab
=
tabNavFix
.
find
(
'.anchor.active'
);
if
(
tabNavFix
.
length
)
{
let
doc
=
$
(
document
);
let
cloneTab
=
tabNavFix
.
clone
(
true
,
true
).
removeAttr
(
'id'
).
addClass
(
'fixnav'
).
prependTo
(
$
(
'.feature-page'
));
store
.
tab
.
cloneTabs
=
cloneTab
.
find
(
'a.anchor'
);
$
(
window
).
scroll
(
function
()
{
let
top
=
doc
.
scrollTop
();
let
top1
=
curTab
.
offset
().
top
;
if
(
top
>
top1
)
{
cloneTab
.
fadeIn
(
'slow'
);
}
else
{
cloneTab
.
fadeOut
(
'slow'
);
}
});
}
}
for
(
let
i
=
2
;
i
<=
tab
.
length
;
i
++
)
{
$
(
'div[tabname="'
+
tabname
+
i
+
'"]'
).
hide
();
}
});
function
syncTabsStatus
()
{
if
(
store
.
tab
.
tabs
.
length
)
{
store
.
tab
.
tabs
.
on
(
'click'
,
function
()
{
var
tabname
=
$
(
this
).
attr
(
'tab'
);
var
isActive
=
$
(
this
).
hasClass
(
'active'
);
if
(
!
store
.
tab
.
cloneTabs
.
length
)
{
return
;
}
store
.
tab
.
cloneTabs
.
each
(
function
(
index
,
ele
)
{
var
$ele
=
$
(
ele
);
if
(
$ele
.
attr
(
'tab'
)
===
tabname
)
{
if
(
isActive
)
{
$ele
.
addClass
(
'active'
);
$ele
.
find
(
'img'
).
show
();
$ele
.
siblings
(
'a.anchor'
).
removeClass
(
'active'
);
$ele
.
siblings
(
'a.anchor'
).
find
(
'img'
).
hide
();
}
}
});
});
}
if
(
store
.
tab
.
cloneTabs
.
length
)
{
store
.
tab
.
cloneTabs
.
on
(
'click'
,
function
()
{
var
tabname
=
$
(
this
).
attr
(
'tab'
);
var
isActive
=
$
(
this
).
hasClass
(
'active'
);
store
.
tab
.
tabs
.
each
(
function
(
index
,
ele
)
{
var
$ele
=
$
(
ele
);
if
(
$ele
.
attr
(
'tab'
)
===
tabname
)
{
if
(
isActive
)
{
$ele
.
addClass
(
'active'
);
$ele
.
find
(
'img'
).
show
();
$ele
.
siblings
(
'a.anchor'
).
removeClass
(
'active'
);
$ele
.
siblings
(
'a.anchor'
).
find
(
'img'
).
hide
();
}
}
});
});
}
}
function
modalInit
()
{
...
...
@@ -935,6 +1048,12 @@ $(function() {
// tab
tabInit
();
// tab 顶悬浮
tabFixInit
();
// 同步 tab 和 tab 顶悬浮的选中状态
syncTabsStatus
();
if
(
sessionStorage
)
{
// 微信中点击之后,返回跳到指定位置
let
totalH
,
scH
;
...
...
@@ -1002,4 +1121,8 @@ $(function() {
if
(
yoho
.
isApp
)
{
require
(
'./feature/goods-show-yas-rpter'
);
}
lazyLoad
(
$
(
'img.lazy'
),
{
q
:
85
});
});
...
...
public/scss/feature/anchor.scss
View file @
8a28815
...
...
@@ -136,7 +136,7 @@ li {
height
:
100%
;
&
.swiper
{
padding
:
5px
1
0px
;
padding
:
5px
2
0px
;
height
:
100%
;
}
}
...
...
public/scss/feature/product.scss
View file @
8a28815
...
...
@@ -75,6 +75,27 @@
width
:
100%
;
transform
:
translateX
(
-50%
);
}
.new-brand-name
{
position
:
absolute
;
bottom
:
0
;
left
:
0
;
right
:
0
;
background-color
:
#272829
;
padding-top
:
5px
;
padding-bottom
:
5px
;
.brand-name
{
display
:
-
webkit-box
;
-webkit-box-orient
:
vertical
;
-webkit-line-clamp
:
1
;
text-align
:
center
;
line-height
:
30px
;
overflow
:
hidden
;
font-size
:
26px
;
color
:
#fff
;
}
}
}
&
.single-item3
{
...
...
@@ -120,7 +141,7 @@
.feature-product-info
{
float
:
left
;
width
:
288px
;
margin-right
:
2
0
px
;
margin-right
:
2
4
px
;
margin-top
:
25px
;
overflow
:
hidden
;
...
...
@@ -215,6 +236,20 @@
}
}
.sales-imgs-new1
{
position
:
absolute
;
right
:
0
;
bottom
:
40px
;
width
:
100%
;
height
:
auto
;
z-index
:
1
;
.advance
{
position
:
absolute
;
bottom
:
0
;
}
}
.sales-product-pool
{
.advance
{
display
:
none
;
...
...
@@ -317,6 +352,10 @@
display
:
block
;
margin
:
0
auto
;
}
.price-img
{
display
:
block
;
}
}
.new-brand-name
{
...
...
@@ -325,8 +364,8 @@
left
:
0
;
right
:
0
;
background-color
:
#272829
;
padding-top
:
5px
;
padding-bottom
:
5px
;
padding-top
:
10px
;
padding-bottom
:
10px
;
.brand-name
{
display
:
-
webkit-box
;
...
...
@@ -338,6 +377,11 @@
font-size
:
26px
;
color
:
#fff
;
}
.add-padding5
{
padding-top
:
5px
;
padding-bottom
:
5px
;
}
}
.new-price
{
...
...
@@ -349,14 +393,14 @@
>
.sale-price
{
margin-left
:
10px
;
font-size
:
32
px
;
font-size
:
24
px
;
font-weight
:
700
;
color
:
#fff
;
}
>
.market-price
{
margin-left
:
10px
;
font-size
:
24
px
;
font-size
:
18
px
;
font-weight
:
400
;
color
:
#fff
;
}
...
...
utils/helpers.js
View file @
8a28815
...
...
@@ -58,9 +58,7 @@ module.exports = {
return
style
;
},
tabName
:
function
(
index
,
tabnames
)
{
var
names
=
tabnames
.
split
(
','
);
return
names
[
index
];
return
tabnames
[
index
].
link
;
},
tabStyle
:
function
(
index
,
count
)
{
let
width
=
(
100
/
Number
(
count
)).
toFixed
(
2
);
...
...
Please
register
or
login
to post a comment