Authored by ccbikai

merge code

... ... @@ -201,8 +201,8 @@ class Helpers
$result['product_id'] = $productData['product_id'];
$result['thumb'] = Images::getImageUrl($productData['default_images'], $width, $height);
$result['name'] = $productData['product_name'];
$result['price'] = $productData['market_price'];
$result['salePrice'] = $productData['sales_price'];
$result['price'] = $productData['market_price'] . '.00';
$result['salePrice'] = $productData['sales_price'] . '.00';
$result['is_soon_sold_out'] = ($productData['is_soon_sold_out'] === 'Y');
$result['url'] = SITE_MAIN . '/product/pro_' . $productData['product_id'] . '_'
. $productData['goods_list'][0]['goods_id']
... ...
... ... @@ -16,14 +16,11 @@ var searchH = $('.newbrand-search').outerHeight(),
headerH = $('.yoho-header').outerHeight(),
brandSwipe = parseInt(searchH) + parseInt(headerH) - 1;
var myHammer,
brandsData,
var brandsData,
$keyword,
searchBtnHammer,
clearTextHammer;
var $rightBarCon = $('#right-bar .con').find('b').unbind();
swiper = new Swiper('.swiper-container', {
lazyLoading: true,
loop: true,
... ... @@ -56,27 +53,18 @@ $(window).scroll(function() {
});
});
function rightBarBindClick() {
$rightBarCon = $('#right-bar .con').find('b').unbind();
myHammer = new Hammer($rightBarCon[0]);
myHammer.on('tap', function(e) {
var index = $rightBarCon.index();
$('#right-bar .con').find('b').unbind().on('touchstart', function(e) {
var index = $(this).index();
if ($('.bar-' + index).size() > 0) {
document.body.scrollTop = parseInt($('.bar-' + index)[0].offsetTop) - parseInt(brandSwipe - 1);
}
e.srcEvent.stopPropagation();
e.stopPropagation();
});
}
if ($rightBarCon[0]) {
rightBarBindClick();
}
/**
* 品牌搜索
*/
rightBarBindClick();
function searchResult() {
var keyword = ($keyword.val() + '').toLowerCase();
... ...