Authored by yyq

图片缩略图操作

... ... @@ -95,11 +95,11 @@ const setBrandBanner = brand => {
let data = {
bgColor: '#000',
brandLogo: {
link: `#${brand.brandDomain}`, // 品牌跳转链接 -- 待处理
link: `/product/shop/${brand.brandDomain}`, // 品牌跳转链接 -- 待处理
img: brand.brandIco
},
brandHome: {
link: `#${brand.brandDomain}` // 品牌跳转链接 -- 待处理
link: `/product/shop/${brand.brandDomain}` // 品牌跳转链接 -- 待处理
}
};
... ...
... ... @@ -8,12 +8,12 @@
{{# goodInfo}}
<div class="product-main clearfix">
<div class="thumbs left clearfix">
<div class="thumb-list">
<div class="thumb-list hide">
{{# colors}}
<div class="thumb-wrap{{#unless cur}} hide{{/unless}}">
{{#if cur}}
{{# thumbs}}
<img class="thumb" src="{{image . 75 100}}" data-shower="{{image . 482 643}}">
<img class="thumb{{#if @first}} cur{{/if}}" src="{{image . 75 100}}" data-shower="{{image . 482 643}}">
{{/ thumbs}}
{{^}}
{{# thumbs}}
... ... @@ -77,10 +77,22 @@
<span class="btn">即将开售</span>
{{/if}}
{{^}}
<span id="add-to-bag" class="btn">加入购物袋</span>
<span id="add-to-bag" class="btn">
<i class="iconfont">&#xe632;</i>
加入购物袋
</span>
{{/ fashionTopGoods}}
<span id="sold-out" class="btn disable hide">已售罄</span>
<span id="collect-product" class="btn white">收藏商品</span>
<span id="collect-product" class="btn white">
<span class="collecting">
<i class="iconfont">&#xe644;</i>
收藏商品
</span>
<span class="collected">
<i class="iconfont">&#xe627;</i>
已收藏
</span>
</span>
</p>
{{> share}}
</div>
... ...
No preview for this file type
... ... @@ -2,7 +2,7 @@
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
<svg xmlns="http://www.w3.org/2000/svg">
<metadata>
Created by FontForge 20120731 at Thu Jul 14 10:06:11 2016
Created by FontForge 20120731 at Sat Jul 16 14:46:14 2016
By admin
</metadata>
<defs>
... ... @@ -19,7 +19,7 @@ Created by FontForge 20120731 at Thu Jul 14 10:06:11 2016
bbox="0 -224 1303 896.303"
underline-thickness="50"
underline-position="-100"
unicode-range="U+0078-E643"
unicode-range="U+0078-E644"
/>
<missing-glyph horiz-adv-x="374"
d="M34 0v682h272v-682h-272zM68 34h204v614h-204v-614z" />
... ... @@ -233,5 +233,9 @@ t-14.5 40.5t-39.5 15.5z" />
<glyph glyph-name="uniE643" unicode="&#xe643;"
d="M512 896q-139 0 -257 -68.5t-186.5 -186.5t-68.5 -257t68.5 -257t186.5 -186.5t257 -68.5t257 68.5t186.5 186.5t68.5 257t-68.5 257t-186.5 186.5t-257 68.5zM563 26h-102v102h102v-102zM669 422l-46 -47q-32 -32 -46 -62t-14 -83h-102v26q0 84 60 145l63 64
q30 30 30 73q0 42 -30 72t-72 30t-72 -30t-30 -72h-103q0 84 60 144t145 60t145 -60t60 -144q0 -68 -48 -116z" />
<glyph glyph-name="uniE644" unicode="&#xe644;"
d="M707 803q-57 0 -108.5 -27.5t-87.5 -75.5q-36 48 -87.5 75.5t-108.5 27.5q-105 0 -179 -81t-74 -196q0 -42 13 -84t25.5 -64t34.5 -57q27 -42 72 -92.5t86 -89.5t88 -79.5t66 -55.5t32 -25q14 -11 32 -11t32 11q13 9 32 24.5t66 56t88 79.5t86 89.5t72 92.5
q22 35 34.5 57t25.5 64t13 84q0 115 -74 196t-179 81zM841 356q-26 -40 -70 -89t-84.5 -87t-86.5 -77t-62.5 -52.5t-26.5 -21.5q-10 8 -26.5 21t-62.5 52.5t-86 77.5t-84.5 87t-70.5 89q-20 32 -31.5 53t-21.5 53t-10 64q0 89 57.5 152t139.5 63q59 0 107.5 -35t71.5 -93v1
q4 -14 17 -14t17 14q23 57 71.5 92t107.5 35q82 0 139.5 -63t57.5 -152q0 -46 -16 -83.5t-47 -86.5z" />
</font>
</defs></svg>
... ...
No preview for this file type
No preview for this file type
... ... @@ -90,6 +90,20 @@ function chooseColor(index) {
$sizeList.eq(index).removeClass('hide');
}
// 缩略图垂直居中
$thumbWrap.each(function() {
var $this = $(this),
$child = $this.children();
if ($child.length) {
$this.css('padding-top', (642 - 105 * $child.length) / 2);
}
});
// $thumbWrap.parent().animate({visibility: 'visible'});
$thumbWrap.parent().removeClass('hide');
// 展示图
$thumbWrap.on('mouseenter', '.thumb', function() {
changeThumb($(this));
... ...
... ... @@ -6,7 +6,6 @@
.thumb-list {
width: 75px;
display: inline-block;
vertical-align: middle;
}
.thumb {
... ... @@ -140,6 +139,28 @@
line-height: 46px;
margin: 0 auto 20px;
cursor: pointer;
&.white {
color: #1d1d1d;
}
.iconfont {
font-size: 14px;
}
.collected {
display: none;
}
}
.coll {
.collecting {
display: none;
}
.collected {
display: block;
}
}
.share {
... ...