Authored by 石坚

Merge branch 'release/1.0' of http://git.yoho.cn/fe/yoho-blk into release/1.0

... ... @@ -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)}')`;
... ...
... ... @@ -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);
});
... ...
... ... @@ -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 {
... ...
... ... @@ -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">&#xe61b;</span>
<span class="iconfont icon-round">&#xe620;</span>
</label>
</span>
{{/each}}
</div>
... ...