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
Email Patches
Plain Diff
Browse Files
Authored by
yyq
9 years ago
Commit
21bba037a45be03f16fc30c639e664d117302730
1 parent
206fe680
商品颜色优先取颜色图片
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
apps/product/models/item-handler.js
apps/product/models/item-handler.js
View file @
21bba03
...
...
@@ -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)}'
)
`
;
...
...
Please
register
or
login
to post a comment