...
|
...
|
@@ -488,10 +488,10 @@ function searchResult() { |
|
|
|
|
|
brandHtml.push('<p><a href="' + brand.url + '">' + brand.name);
|
|
|
if (brand.isNew) {
|
|
|
brandHtml.push('<i class="icon-hot">HOT</i>');
|
|
|
brandHtml.push('<i class="icon-new">NEW</i>');
|
|
|
}
|
|
|
if (brand.isHot) {
|
|
|
brandHtml.push('<i class="icon-new">NEW</i>');
|
|
|
brandHtml.push('<i class="icon-hot">HOT</i>');
|
|
|
}
|
|
|
brandHtml.push('</a></p>');
|
|
|
});
|
...
|
...
|
@@ -4763,7 +4763,10 @@ var goodsSwiper, |
|
|
var goodsDiscountEl = document.getElementById('goodsDiscount'),
|
|
|
goodsDiscountHammer = goodsDiscountEl && new Hammer(goodsDiscountEl);
|
|
|
|
|
|
var $cart = $('.cart-bar');
|
|
|
var $cart = $('.cart-bar'),
|
|
|
$goodsSubtitle = $('.goodsSubtitle'),
|
|
|
divH,
|
|
|
$goodsSubtitleSpan;
|
|
|
|
|
|
require("js/product/detail/desc");
|
|
|
require("js/product/detail/comments-consults");
|
...
|
...
|
@@ -4830,6 +4833,14 @@ $.ajax({ |
|
|
}
|
|
|
});
|
|
|
|
|
|
//限制goodsSubtitle为两行
|
|
|
if ($goodsSubtitle[0]) {
|
|
|
divH = $goodsSubtitle.height();
|
|
|
$goodsSubtitleSpan = $goodsSubtitle.find('span');
|
|
|
while ($goodsSubtitleSpan.outerHeight() > divH) {
|
|
|
$goodsSubtitleSpan.text($goodsSubtitleSpan.text().replace(/(\s)*([a-zA-Z0-9]+|\W)(\.\.\.)?$/, '...'));
|
|
|
}
|
|
|
}
|
|
|
require("js/product/detail/like");
|
|
|
|
|
|
});
|
...
|
...
|
@@ -4948,7 +4959,9 @@ var consultFooterEle = document.getElementById('consult-content-footer'), |
|
|
navtabHammer = navtabEle && new Hammer(navtabEle),
|
|
|
|
|
|
gotoConsultEle = document.getElementById('goto-consult'),
|
|
|
gotoConsultHammer = gotoConsultEle && new Hammer(gotoConsultEle);
|
|
|
gotoConsultHammer = gotoConsultEle && new Hammer(gotoConsultEle),
|
|
|
|
|
|
$gotoConsult = $('#goto-consult');
|
|
|
|
|
|
|
|
|
|
...
|
...
|
@@ -5010,6 +5023,25 @@ if (gotoConsultHammer) { |
|
|
location.href = $(gotoConsultEle).find('a').attr('href');
|
|
|
});
|
|
|
}
|
|
|
|
|
|
function fixConsultBar() {
|
|
|
if ($(window).scrollTop() > $('#yoho-header').outerHeight()) {
|
|
|
$gotoConsult.css('position', 'fixed');
|
|
|
$gotoConsult.css('top', '0');
|
|
|
} else {
|
|
|
$gotoConsult.css('position', 'static');
|
|
|
}
|
|
|
}
|
|
|
|
|
|
//滚动时顶部固定 我要咨询
|
|
|
function scrollHandler() {
|
|
|
fixConsultBar();
|
|
|
}
|
|
|
|
|
|
$(window).scroll(function() {
|
|
|
window.requestAnimationFrame(scrollHandler);
|
|
|
});
|
|
|
|
|
|
});
|
|
|
define("js/product/recommend-for-you-product-desc", ["swiper","jquery","index"], function(require, exports, module){
|
|
|
/**
|
...
|
...
|
|