Authored by Rock Zhang

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

... ... @@ -23,18 +23,17 @@ class Yohobuy
// const SERVICE_URL = 'http://service.api.yohobuy.com/';
// const YOHOBUY_URL = 'http://www.yohobuy.com/';
// const API_URL = 'http://apih5.yoho.cn/';
// const API_URL2 = 'http://apih5.yoho.cn/';
// const SERVICE_URL = 'http://serviceh5.yoho.cn/';
// const YOHOBUY_URL = 'http://www.yohobuy.com/';
// const API_OLD = 'http://api2.open.yohobuy.com/';
/* 测试环境 */
const API_URL = 'http://testapi.yoho.cn:28078/';
const SERVICE_URL = 'http://testservice.yoho.cn:28077/';
const API_URL = 'http://apih5.yoho.cn/';
const API_URL2 = 'http://apih5.yoho.cn/';
const SERVICE_URL = 'http://serviceh5.yoho.cn/';
const YOHOBUY_URL = 'http://www.yohobuy.com/';
const API_OLD = 'http://test2.open.yohobuy.com/';
const API_OLD = 'http://api2.open.yohobuy.com/';
// /* 测试环境 */
// const API_URL = 'http://testapi.yoho.cn:28078/';
// const SERVICE_URL = 'http://testservice.yoho.cn:28077/';
// const YOHOBUY_URL = 'http://www.yohobuy.com/';
// const API_OLD = 'http://test2.open.yohobuy.com/';
/**
* 私钥列表
... ...
... ... @@ -34,7 +34,6 @@ class LoginData
$param['area'] = $area;
$param['profile'] = $profile;
$param['password'] = $password;
if (!empty($shoppingKey)) {
$param['shopping_key'] = $shoppingKey;
}
... ... @@ -65,9 +64,10 @@ class LoginData
* @param string $nickname 姓名
* @param string $openId 第三方唯一识别码
* @param string $sourceType 登录方式
* @param string $shoppingKey 未登录用户唯一识别码, 默认为空
* @return array 登录返回结果
*/
public static function signinByOpenID($nickname, $openId, $sourceType)
public static function signinByOpenID($nickname, $openId, $sourceType, $shoppingKey = null)
{
// 构建必传参数
$param = Yohobuy::param();
... ... @@ -77,6 +77,9 @@ class LoginData
$param['source_type'] = $sourceType;
$param['nickname'] = $nickname;
$param['client_secret'] = Sign::getSign($param);
if (!empty($shoppingKey)) {
$param['shopping_key'] = $shoppingKey;
}
return Yohobuy::get(Yohobuy::API_URL, $param);
}
... ...
... ... @@ -79,6 +79,9 @@ if ('advance' === cartType) {
$cartContent.toggleClass('hide');
$('#common-cart-nav').removeClass('active');
$('#presell-cart-nav').addClass('active');
$('.shopping-cart-good .name').each(function() {
this.mlellipsis(2);
});
}
if ($('.cart-nav').length > 0) {
... ... @@ -90,6 +93,10 @@ if ($('.cart-nav').length > 0) {
return;
}
$('.shopping-cart-good .name').each(function() {
this.mlellipsis(2);
});
if (cartType === 'ordinary') {
cartType = 'advance';
$('#cartType').val('advance');
... ...
... ... @@ -22,9 +22,11 @@ lazyLoad({
try_again_css: 'good-failure'
});
$('.shopping-cart-good .name').each(function() {
this.mlellipsis(2);
});
setTimeout(function() {
$('.shopping-cart-good .name').each(function() {
this.mlellipsis(2);
});
}, 0);
function GoodInfo(properties) {
this.goods_type = properties.goods_type;
... ... @@ -104,7 +106,7 @@ $('.cart-goods').on('touchstart', '.checkbox', function() {
});
orderInfo('couponCode', null);
orderInfo('couponName', null);
history.go(0);
window.location.href = '/cart/index/index?cartType=' + $('#cartType').val();
} else {
tip.show(data.message);
}
... ... @@ -190,11 +192,13 @@ function bottomCheckBoxHandeler(isSelected, type, handlerAfterTouch) {
//全选按钮点击事件
$selectAllBtn.on('touchend', function() {
if ($('.low-stocks').length > 0) {
var isSelect = $(this).hasClass('icon-cb-checked');
if (!isSelect && $('.low-stocks').length > 0) {
tip.show('所选商品中含有库存不足的商品');
return false;
}
bottomCheckBoxHandeler($(this).hasClass('icon-cb-checked'), $('#cartType').val(), didUpdateAllGoodsCheckStatus);
bottomCheckBoxHandeler(isSelect, $('#cartType').val(), didUpdateAllGoodsCheckStatus);
});
$('.down').on('touchend', function() {
... ...
... ... @@ -58,6 +58,7 @@
}
.sale-price {
color: #e10;
margin-right: pxToRem(15px);
&.no-price {
color: #000;
... ...
... ... @@ -782,7 +782,7 @@ class HomeController extends AbstractAction
$this->auditJumpLogin();
$this->setTitle('支付中心');
$this->setNavHeader('支付中心', Helpers::url('/cart/index/index'));
$this->setNavHeader('支付中心', Helpers::url('/home/orders'), '');
$orderCode = $this->get('order_code');
if (empty($orderCode)) {
... ...
... ... @@ -193,7 +193,8 @@ class LoginController extends AbstractAction
$result = array();
if (isset($realName, $email, $userId)) {
$result = LoginData::signinByOpenID($realName, $userId, 'alipay');
$shoppingKey = Helpers::getShoppingKeyByCookie();
$result = LoginData::signinByOpenID($realName, $userId, 'alipay', $shoppingKey);
}
//判定是否需要绑定手机号
... ... @@ -229,7 +230,8 @@ class LoginController extends AbstractAction
$partnerInfo = $qqconnect->getUserInfo($access);
$result = array();
if (!empty($partnerInfo) && isset($partnerInfo['nickname'])) {
$result = LoginData::signinByOpenID($partnerInfo['nickname'], $access['openid'], 'qq');
$shoppingKey = Helpers::getShoppingKeyByCookie();
$result = LoginData::signinByOpenID($partnerInfo['nickname'], $access['openid'], 'qq', $shoppingKey);
}
//判定是否需要绑定手机号
... ... @@ -266,7 +268,8 @@ class LoginController extends AbstractAction
$result = array();
if ($partnerInfo && is_array($partnerInfo)) {
$result = LoginData::signinByOpenID($partnerInfo['screen_name'], $access['uid'], 'sina');
$shoppingKey = Helpers::getShoppingKeyByCookie();
$result = LoginData::signinByOpenID($partnerInfo['screen_name'], $access['uid'], 'sina', $shoppingKey);
}
//判定是否需要绑定手机号
if (isset($result['data']['is_bind']) && $result['data']['is_bind'] == 'N') {
... ...