Authored by ccbikai

merge code

@@ -201,8 +201,8 @@ class Helpers @@ -201,8 +201,8 @@ class Helpers
201 $result['product_id'] = $productData['product_id']; 201 $result['product_id'] = $productData['product_id'];
202 $result['thumb'] = Images::getImageUrl($productData['default_images'], $width, $height); 202 $result['thumb'] = Images::getImageUrl($productData['default_images'], $width, $height);
203 $result['name'] = $productData['product_name']; 203 $result['name'] = $productData['product_name'];
204 - $result['price'] = $productData['market_price'];  
205 - $result['salePrice'] = $productData['sales_price']; 204 + $result['price'] = $productData['market_price'] . '.00';
  205 + $result['salePrice'] = $productData['sales_price'] . '.00';
206 $result['is_soon_sold_out'] = ($productData['is_soon_sold_out'] === 'Y'); 206 $result['is_soon_sold_out'] = ($productData['is_soon_sold_out'] === 'Y');
207 $result['url'] = SITE_MAIN . '/product/pro_' . $productData['product_id'] . '_' 207 $result['url'] = SITE_MAIN . '/product/pro_' . $productData['product_id'] . '_'
208 . $productData['goods_list'][0]['goods_id'] 208 . $productData['goods_list'][0]['goods_id']
@@ -16,14 +16,11 @@ var searchH = $('.newbrand-search').outerHeight(), @@ -16,14 +16,11 @@ var searchH = $('.newbrand-search').outerHeight(),
16 headerH = $('.yoho-header').outerHeight(), 16 headerH = $('.yoho-header').outerHeight(),
17 brandSwipe = parseInt(searchH) + parseInt(headerH) - 1; 17 brandSwipe = parseInt(searchH) + parseInt(headerH) - 1;
18 18
19 -var myHammer,  
20 - brandsData, 19 +var brandsData,
21 $keyword, 20 $keyword,
22 searchBtnHammer, 21 searchBtnHammer,
23 clearTextHammer; 22 clearTextHammer;
24 23
25 -var $rightBarCon = $('#right-bar .con').find('b').unbind();  
26 -  
27 swiper = new Swiper('.swiper-container', { 24 swiper = new Swiper('.swiper-container', {
28 lazyLoading: true, 25 lazyLoading: true,
29 loop: true, 26 loop: true,
@@ -56,27 +53,18 @@ $(window).scroll(function() { @@ -56,27 +53,18 @@ $(window).scroll(function() {
56 }); 53 });
57 }); 54 });
58 55
59 -  
60 function rightBarBindClick() { 56 function rightBarBindClick() {
61 - $rightBarCon = $('#right-bar .con').find('b').unbind();  
62 - myHammer = new Hammer($rightBarCon[0]);  
63 - myHammer.on('tap', function(e) {  
64 - var index = $rightBarCon.index(); 57 + $('#right-bar .con').find('b').unbind().on('touchstart', function(e) {
  58 + var index = $(this).index();
65 59
66 if ($('.bar-' + index).size() > 0) { 60 if ($('.bar-' + index).size() > 0) {
67 document.body.scrollTop = parseInt($('.bar-' + index)[0].offsetTop) - parseInt(brandSwipe - 1); 61 document.body.scrollTop = parseInt($('.bar-' + index)[0].offsetTop) - parseInt(brandSwipe - 1);
68 } 62 }
69 - e.srcEvent.stopPropagation(); 63 + e.stopPropagation();
70 }); 64 });
71 } 65 }
72 66
73 -if ($rightBarCon[0]) {  
74 - rightBarBindClick();  
75 -}  
76 -  
77 -/**  
78 - * 品牌搜索  
79 - */ 67 +rightBarBindClick();
80 68
81 function searchResult() { 69 function searchResult() {
82 var keyword = ($keyword.val() + '').toLowerCase(); 70 var keyword = ($keyword.val() + '').toLowerCase();