Authored by 黄涛

Merge branch 'hotfix/addressId' into 'master'

地址ID重复加密问题修复



See merge request !10
... ... @@ -446,8 +446,8 @@ class CartModel
// 收货人有关信息
$isSunfengSupport = false; // 是否支持顺丰快递
if (isset($payReturn['delivery_address']) && !empty($payReturn['delivery_address'])) {
$result['addressId'] = isset($address['address_id']) ? $address['address_id'] : $payReturn['delivery_address']['address_id'];
$result['addressId'] = Encryption::encrypt($result['addressId']);
// $address 是浏览器端传来的,已经加密, $payReturn 是后端接口的,未加密
$result['addressId'] = isset($address['address_id']) ? $address['address_id'] : Encryption::encrypt($payReturn['delivery_address']['address_id']);
$result['name'] = isset($address['consignee']) ? $address['consignee'] : $payReturn['delivery_address']['consignee'];
$result['phoneNum'] = isset($address['mobile']) ? $address['mobile'] : $payReturn['delivery_address']['mobile'];
// $result['area'] = isset($address['area']) ? $address['area'] : $payReturn['delivery_address']['area'];
... ... @@ -539,7 +539,7 @@ class CartModel
}
$oneGoods['yohoCoinNum'] = $single['yoho_coin_num'];
//gift=>是否赠品,advanceBuy=>是否加价购;
if ($single['goods_type'] == 'gift' && !isset($single['isAdvanceBuy'])) {
$oneGoods['gift'] = true;
... ... @@ -558,7 +558,7 @@ class CartModel
// 商品金额
$result['goodsPrice'] = Helpers::transPrice($goodsPrice);
}
// 支付方式
... ... @@ -613,7 +613,7 @@ class CartModel
//有货币
if((int)$payReturn['shopping_cart_data']['gain_yoho_coin'] > 0) {
$result['yohoCoinNum'] = $payReturn['shopping_cart_data']['gain_yoho_coin'];
$result['returnYohoCoin'] = true;
}
... ... @@ -655,7 +655,7 @@ class CartModel
$result['coupon'] = $coupons;
}
while (false);
return $result;
}
... ... @@ -1116,7 +1116,7 @@ class CartModel
$result['sumPrice'] = Helpers::transPrice($data['shopping_cart_data']['last_order_amount']);
}
while (0);
return $result;
}
... ... @@ -1150,8 +1150,8 @@ class CartModel
* @param type $deliveryId 配送方式,1表示普通快递,2表示顺丰速运
* @param type $paymentType 支付方式,1表示在线支付,2表示货到付款
* @param type $couponCode 优惠券码
* @param type $yohoCoin 使用的有货币数量
* @return type
* @param type $yohoCoin 使用的有货币数量
* @return type
*/
public static function getPackageInfo($uid, $cartType, $skuList, $orderCode, $sessionKey, $deliveryId, $paymentType, $couponCode, $yohoCoin)
{
... ... @@ -1264,7 +1264,7 @@ class CartModel
return $result;
}
public static function ticketsOrderCompute($uid, $productSku, $buyNumber, $yohoCoin)
public static function ticketsOrderCompute($uid, $productSku, $buyNumber, $yohoCoin)
{
$result = array();
... ...
... ... @@ -612,6 +612,7 @@ class IndexController extends AbstractAction
}
$moreUrl = $this->getSession('addressMore');
$moreUrl = !empty($moreUrl) ? $moreUrl : '/cart/index/orderEnsure';
$this->setNavHeader('选择地址', $moreUrl, false);
$this->_view->display('select-address', array(
... ...