Authored by htoooth

fix color tip

... ... @@ -348,7 +348,8 @@ const _getSkuDataByProductBaseInfo = (data) => {
num: _.parseInt(size.storage_number),
goodsId: size.size_id,
notify: size.notify,
soldOut: _.parseInt(size.storage_number) === 0
soldOut: _.parseInt(size.storage_number) === 0,
info: size.size_info
});
// 单个sku商品的总数
... ...
<div class="chose-size row clearfix">
<span class="title pull-left">&nbsp;&nbsp;码: </span>
<span class="title pull-left">&nbsp;&nbsp;码: </span>
<div id="sizes" class="size-wrapper pull-left">
{{#each colors}}
... ... @@ -11,19 +11,20 @@
data-num="{{num}}"
data-name="{{name}}"
data-notify="{{notify}}"
data-title="{{title}}">
data-title="{{title}}"
data-info="{{info}}">
{{name}}</li>
{{/each}}
</ul>
{{/each}}
<span class="size-warn warn-tip hide"> <i class="iconfont">&#xe61f;</i> 请选择尺码 </span>
{{#unless virtualGoods}}
<p class="color-size-tip hide"></p>
<p class="color-size-tip hide"> 懒汉 困兽了</p>
{{/unless}}
</div>
<p class="size-warn warn-tip hide"> <i class="iconfont">&#xe61f;</i> 请选择尺码 </p>
</div>
</div>
... ...
... ... @@ -161,8 +161,8 @@ bindEvent.add(function() {
var $size = $('#sizes'),
$sizes = $size.children('.size'),
$sizeWarn = $size.find('.size-warn'),
$colorSizeTip = $size.children('.color-size-tip');
$sizeWarn = $('.size-warn'),
$sizeTip = $size.children('.color-size-tip');
var $num = $('#num'),
$plusNum = $('#plus-num'),
... ... @@ -531,8 +531,7 @@ bindEvent.add(function() {
$maxColor = $this;
// 初始化color-size显示或隐藏
$colorSizeTip.addClass('hide');
// 隐藏尺码提示
$sizeWarn.addClass('hide');
... ... @@ -589,6 +588,9 @@ bindEvent.add(function() {
if (!maxStock) {
maxStock = -1;
$enableNotifyYou.addClass('hide'); // 没有
// 初始化color-size显示或隐藏
$sizeTip.addClass('hide');
}
resetNum();
... ... @@ -620,7 +622,7 @@ bindEvent.add(function() {
$this.siblings('.focus').removeClass('focus');
$this.addClass('focus');
$colorSizeTip.html($this.data('title')).removeClass('hide');
$sizeTip.html($this.data('info')).removeClass('hide');
$sizeWarn.addClass('hide');
... ...
... ... @@ -600,13 +600,6 @@
cursor: pointer;
}
.size-warn {
display: inline-block;
height: 21px;
left: 0;
bottom: -21px;
}
.num-warn {
float: left;
height: 24px;
... ... @@ -614,9 +607,10 @@
}
.color-size-tip {
font-size: 13px;
color: #999;
clear: both;
line-height: 18px;
margin-top: -5px;
}
.line {
... ... @@ -1919,12 +1913,12 @@
}
.warn-tip {
display: inline-block;
font-size: 13px;
color: #d0021b;
font-size: 12px;
clear: both;
i {
font-size: 14px;
.iconfont {
font-size: 10px !important;
}
}
... ...