Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yoho-blk
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
1
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Plain Diff
Browse Files
Authored by
石坚
9 years ago
Commit
3d94ecd1160d834a7a4c92d4211b382b0c4ee7ea
2 parents
59331a2e
21bba037
Merge branch 'release/1.0' of
http://git.yoho.cn/fe/yoho-blk
into release/1.0
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
29 additions
and
10 deletions
apps/product/models/item-handler.js
apps/product/models/shop-service.js
public/scss/shopping/_cart-products.css
public/tpl/shopping/edit-color-size.hbs
apps/product/models/item-handler.js
View file @
3d94ecd
...
...
@@ -358,8 +358,11 @@ const setProductData = base => {
total
:
0
};
// 有RGB值限时rgb值没有则显示背景图
if
(
value
.
colorCode
)
{
// 有颜色图片时显示颜色图片,无颜色图片时显示rgb值
// 都没有则显示商品图
if
(
value
.
colorValue
)
{
group
.
bgImg
=
value
.
colorValue
;
}
else
if
(
value
.
colorCode
)
{
group
.
rgb
=
`#
$
{
value
.
colorCode
}
`
;
}
else
{
group
.
rgb
=
`
url
(
'${helpers.image(value.colorImage, 30, 30)}'
)
`
;
...
...
apps/product/models/shop-service.js
View file @
3d94ecd
...
...
@@ -103,7 +103,7 @@ const ShopService = {
if
(
data
&&
data
.
data
)
{
let
sorts
=
camelCase
(
data
.
data
.
sort
);
sorts
.
forEach
(
s
=>
{
_
.
each
(
sorts
,
s
=>
{
sortArray
=
sortArray
.
concat
(
s
.
sub
);
});
...
...
public/scss/shopping/_cart-products.css
View file @
3d94ecd
...
...
@@ -11,7 +11,7 @@ $hoverColor: #379ed6;
cursor
:
pointer
;
border
:
1px
dashed
#999
;
.iconfont
{
>
.iconfont
{
position
:
absolute
;
right
:
5px
;
top
:
3px
;
...
...
@@ -176,7 +176,7 @@ $hoverColor: #379ed6;
width
:
180px
;
position
:
relative
;
.iconfont
{
>
.iconfont
{
display
:
none
;
}
...
...
@@ -211,8 +211,17 @@ $hoverColor: #379ed6;
display
:
inline-block
;
width
:
20px
;
height
:
20px
;
border
:
1px
solid
#000
;
margin-right
:
20px
;
.iconfont
{
font-size
:
20px
;
line-height
:
20px
;
}
}
.current-color
.icon-round
{
color
:
#1b1b1b
;
font-weight
:
bold
;
}
.actions
{
...
...
public/tpl/shopping/edit-color-size.hbs
View file @
3d94ecd
...
...
@@ -8,12 +8,19 @@
<div
class=
"colors-list mb20"
>
{{#
each
colors
}}
<span
class=
"color-item
{{#if
active
}}
current-color
{{/if}}{{#
unless
selectable
}}
disabled
{{/
unless
}}
"
style=
"background:
{{
rgb
}}
"
<span
class=
"input-radio color-item
{{#if
active
}}
current-color
{{/if}}{{#
unless
selectable
}}
disabled
{{/
unless
}}
"
data-imageurl=
"
{{
image
pic
100
134
}}
"
data-target=
"
{{
proId
}}
-color-
{{
@index
}}
"
data-title=
"
{{
color
}}
"
title=
"
{{
color
}}
"
>
<span
class=
"inner"
></span>
data-title=
"
{{
this
.
color
}}
"
title=
"
{{
this
.
color
}}
"
>
<label
class=
"round-color"
title=
"
{{
title
}}
"
style=
"width: 20px; height: 20px;"
>
<div
class=
"icon-back"
style=
"background:
{{
this
.
rgb
}}
"
>
{{#if
bgImg
}}
<img
src=
"
{{
bgImg
}}
"
>
{{/if}}
</div>
<span
class=
"iconfont icon-cover"
>

</span>
<span
class=
"iconfont icon-round"
>

</span>
</label>
</span>
{{/
each
}}
</div>
...
...
Please
register
or
login
to post a comment