Authored by Rock Zhang

Merge branch 'develop' into test

... ... @@ -212,7 +212,16 @@ class Yohobuy
unset($data['private_key']);
}
if (!empty($data)) {
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
// 新加支持application/x-www-form-urlencoded调用方式
$str = '';
foreach ($data as $key => $val) {
$str .= $key . '=' . $val . '&';
}
$str = rtrim($str, '&');
// curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
curl_setopt($ch, CURLOPT_POSTFIELDS, $str);
}
$result = curl_exec($ch);
if (!$returnJson && !empty($result)) {
... ...
... ... @@ -12,13 +12,27 @@ var goodsSwiper,
$discountFolder = $('.goodsDiscount .discount-folder'),
$discountArrow = $('.goodsDiscount .first-item span');
var goodsDiscountHammer = new Hammer(document.getElementById('goodsDiscount'));
var goodsDiscountEl = document.getElementById('goodsDiscount'),
goodsDiscountHammer = goodsDiscountEl && new Hammer(goodsDiscountEl);
require('./desc');
require('./comments-consults');
//add extra marign-bottom for footer to show the yoho copyright
window.reMarginFooter('.cart-bar');
function showFooter() {
var $cartBar = $('.cart-bar');
var timer = setInterval(function() {
if ($cartBar) {
window.reMarginFooter('.cart-bar');
clearInterval(timer);
} else {
$cartBar = $('.cart-bar');
}
}, 200);
}
showFooter();
lazyLoad($('img.lazy'));
... ... @@ -40,15 +54,19 @@ if (0 === $('.goodsDiscount .discount-folder').children().length) {
}
//goods-discount下拉按钮点击事件
goodsDiscountHammer.on('tap', function(e) {
if ($discountFolder.is(':hidden')) {
$discountArrow.removeClass('icon-down').addClass('icon-up').html('');
$discountFolder.slideDown();
} else {
$discountArrow.removeClass('icon-up').addClass('icon-down').html('');
$discountFolder.slideUp();
}
return false;
});
if (goodsDiscountHammer) {
goodsDiscountHammer.on('tap', function(e) {
if ($discountFolder.is(':hidden')) {
$discountArrow.removeClass('icon-down').addClass('icon-up').html('');
$discountFolder.slideDown();
} else {
$discountArrow.removeClass('icon-up').addClass('icon-down').html('');
$discountFolder.slideUp();
}
return false;
});
}
require('./like');
... ...
... ... @@ -471,6 +471,7 @@ class HomeController extends AbstractAction
$service = array(
'header' => array('title' => '在线客服'),
'pageFooter' => true,
'service' => $service
);
... ...