Authored by xuqi

Merge branch 'develop' of http://git.dev.yoho.cn/web/yohobuy into develop

framework @ 119c247f
Subproject commit 75bbc3b075de19f239532f60c5995d06c5f814e2
Subproject commit 119c247f5cf929aa1e059e40609bb16dd6b58f05
... ...
... ... @@ -112,7 +112,7 @@ class NewsaleData
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param, 600); // 缓存10分钟
return Yohobuy::get(Yohobuy::API_URL, $param, 1800); // 缓存30分钟
}
/**
... ...
... ... @@ -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();
... ...
... ... @@ -73,6 +73,7 @@ $sideNav.on('touchend', 'li', function () {
$('.sub-nav').removeClass('show');
$(this).find('.sub-nav').addClass('show');
}
return false;
});
//返回一级导航,收起二级导航
... ...
... ... @@ -55,7 +55,7 @@ class SearchModel
}
// 接口调用正常,数据封装完成, 则设置一级(master)和二级(slave)数据缓存
else {
Cache::set($key, $result, 600); // 缓存10分钟
Cache::set($key, $result, 1800); // 缓存30分钟
}
}
... ...