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
王水玲
6 years ago
Commit
33a9336dc4e9c2a751a2df26bbeff18feed10b60
1 parent
80d78202
活动模版商品组预告添加
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
50 additions
and
1 deletions
apps/activity/models/individuation.js
apps/activity/views/partial/feature/product-new-style.hbs
public/scss/feature/product.scss
apps/activity/models/individuation.js
View file @
33a9336
'use strict'
;
const
_
=
require
(
'lodash'
);
let
_getProduct
=
function
(
o
)
{
return
{
let
plan
=
o
.
product_price_plan_list
;
let
res
=
{
small_sort_id
:
o
.
small_sort_id
,
middle_sort_id
:
o
.
middle_sort_id
,
max_sort_id
:
o
.
max_sort_id
,
...
...
@@ -21,6 +23,29 @@ let _getProduct = function(o) {
default_images
:
o
.
default_images
,
goods_id
:
Array
.
isArray
(
o
.
goods_list
)
&&
o
.
goods_list
.
length
?
o
.
goods_list
[
0
].
goods_id
:
void
0
};
plan
=
_
.
sortBy
(
plan
,
item
=>
{
return
+
item
.
show_begin_time
;
});
if
(
plan
.
length
)
{
let
time
=
Math
.
round
(
new
Date
()
/
1000
);
let
effectPlan
=
[];
plan
.
forEach
(
planItem
=>
{
if
(
planItem
.
effect_time
>
time
)
{
effectPlan
.
push
(
planItem
);
}
});
if
(
effectPlan
.
length
&&
time
>
effectPlan
[
0
].
show_begin_time
&&
effectPlan
[
0
].
show_status
===
'1'
)
{
// eslint-disable-line
o
.
curPlanPrice
=
effectPlan
[
0
].
current_saleprice
;
_
.
assign
({
curPlanPrice
:
effectPlan
[
0
].
current_saleprice
},
res
);
}
}
return
res
;
};
const
gender
=
{
...
...
apps/activity/views/partial/feature/product-new-style.hbs
View file @
33a9336
...
...
@@ -22,6 +22,17 @@
<a
class=
"new-brand-name
{{#
isEqualOr
showBrandUrl
'1'
}}
product-brand
{{else}}
product-detail
{{/
isEqualOr
}}
"
href=
""
>
<span
class=
"brand-name"
{{#if
fontColor
}}
style=
"color:
{{
fontColor
}}
;"
{{/if}}
></span>
</a>
<div
class=
"sales-imgs-new"
>
{{#if
leftDownImg
}}
<img
class=
"leftdownimg lazy"
data-original=
"
{{
image2
leftDownImg
q
=
85
}}
"
>
{{/if}}
{{#
isEqualOr
isAdvance
'1'
}}
<div
class=
"advance"
style=
"background-image: url(
{{
advanceBgImg
}}
);"
>
<img
src=
"
{{
advanceBgImg
}}
"
class=
"img-seat"
>
<span
class=
"advance-price"
></span>
</div>
{{/
isEqualOr
}}
</div>
</div>
</a>
{{#if
brandImg
}}
...
...
public/scss/feature/product.scss
View file @
33a9336
...
...
@@ -176,6 +176,19 @@
z-index
:
1
;
}
.sales-imgs-new
{
position
:
absolute
;
right
:
0
;
bottom
:
55px
;
width
:
100%
;
height
:
auto
;
z-index
:
1
;
.advance
{
display
:
none
;
}
}
.leftdownimg
{
width
:
auto
;
max-width
:
100%
;
...
...
Please
register
or
login
to post a comment