Authored by xuqi

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

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