Authored by 毕凯

地址ID重复加密问题修复

@@ -446,8 +446,8 @@ class CartModel @@ -446,8 +446,8 @@ class CartModel
446 // 收货人有关信息 446 // 收货人有关信息
447 $isSunfengSupport = false; // 是否支持顺丰快递 447 $isSunfengSupport = false; // 是否支持顺丰快递
448 if (isset($payReturn['delivery_address']) && !empty($payReturn['delivery_address'])) { 448 if (isset($payReturn['delivery_address']) && !empty($payReturn['delivery_address'])) {
449 - $result['addressId'] = isset($address['address_id']) ? $address['address_id'] : $payReturn['delivery_address']['address_id'];  
450 - $result['addressId'] = Encryption::encrypt($result['addressId']); 449 + // $address 是浏览器端传来的,已经加密, $payReturn 是后端接口的,未加密
  450 + $result['addressId'] = isset($address['address_id']) ? $address['address_id'] : Encryption::encrypt($payReturn['delivery_address']['address_id']);
451 $result['name'] = isset($address['consignee']) ? $address['consignee'] : $payReturn['delivery_address']['consignee']; 451 $result['name'] = isset($address['consignee']) ? $address['consignee'] : $payReturn['delivery_address']['consignee'];
452 $result['phoneNum'] = isset($address['mobile']) ? $address['mobile'] : $payReturn['delivery_address']['mobile']; 452 $result['phoneNum'] = isset($address['mobile']) ? $address['mobile'] : $payReturn['delivery_address']['mobile'];
453 // $result['area'] = isset($address['area']) ? $address['area'] : $payReturn['delivery_address']['area']; 453 // $result['area'] = isset($address['area']) ? $address['area'] : $payReturn['delivery_address']['area'];
@@ -539,7 +539,7 @@ class CartModel @@ -539,7 +539,7 @@ class CartModel
539 } 539 }
540 540
541 $oneGoods['yohoCoinNum'] = $single['yoho_coin_num']; 541 $oneGoods['yohoCoinNum'] = $single['yoho_coin_num'];
542 - 542 +
543 //gift=>是否赠品,advanceBuy=>是否加价购; 543 //gift=>是否赠品,advanceBuy=>是否加价购;
544 if ($single['goods_type'] == 'gift' && !isset($single['isAdvanceBuy'])) { 544 if ($single['goods_type'] == 'gift' && !isset($single['isAdvanceBuy'])) {
545 $oneGoods['gift'] = true; 545 $oneGoods['gift'] = true;
@@ -558,7 +558,7 @@ class CartModel @@ -558,7 +558,7 @@ class CartModel
558 558
559 // 商品金额 559 // 商品金额
560 $result['goodsPrice'] = Helpers::transPrice($goodsPrice); 560 $result['goodsPrice'] = Helpers::transPrice($goodsPrice);
561 - 561 +
562 } 562 }
563 563
564 // 支付方式 564 // 支付方式
@@ -613,7 +613,7 @@ class CartModel @@ -613,7 +613,7 @@ class CartModel
613 613
614 //有货币 614 //有货币
615 if((int)$payReturn['shopping_cart_data']['gain_yoho_coin'] > 0) { 615 if((int)$payReturn['shopping_cart_data']['gain_yoho_coin'] > 0) {
616 - 616 +
617 $result['yohoCoinNum'] = $payReturn['shopping_cart_data']['gain_yoho_coin']; 617 $result['yohoCoinNum'] = $payReturn['shopping_cart_data']['gain_yoho_coin'];
618 $result['returnYohoCoin'] = true; 618 $result['returnYohoCoin'] = true;
619 } 619 }
@@ -655,7 +655,7 @@ class CartModel @@ -655,7 +655,7 @@ class CartModel
655 $result['coupon'] = $coupons; 655 $result['coupon'] = $coupons;
656 } 656 }
657 while (false); 657 while (false);
658 - 658 +
659 return $result; 659 return $result;
660 } 660 }
661 661
@@ -1116,7 +1116,7 @@ class CartModel @@ -1116,7 +1116,7 @@ class CartModel
1116 $result['sumPrice'] = Helpers::transPrice($data['shopping_cart_data']['last_order_amount']); 1116 $result['sumPrice'] = Helpers::transPrice($data['shopping_cart_data']['last_order_amount']);
1117 } 1117 }
1118 while (0); 1118 while (0);
1119 - 1119 +
1120 return $result; 1120 return $result;
1121 } 1121 }
1122 1122
@@ -1150,8 +1150,8 @@ class CartModel @@ -1150,8 +1150,8 @@ class CartModel
1150 * @param type $deliveryId 配送方式,1表示普通快递,2表示顺丰速运 1150 * @param type $deliveryId 配送方式,1表示普通快递,2表示顺丰速运
1151 * @param type $paymentType 支付方式,1表示在线支付,2表示货到付款 1151 * @param type $paymentType 支付方式,1表示在线支付,2表示货到付款
1152 * @param type $couponCode 优惠券码 1152 * @param type $couponCode 优惠券码
1153 - * @param type $yohoCoin 使用的有货币数量  
1154 - * @return type 1153 + * @param type $yohoCoin 使用的有货币数量
  1154 + * @return type
1155 */ 1155 */
1156 public static function getPackageInfo($uid, $cartType, $skuList, $orderCode, $sessionKey, $deliveryId, $paymentType, $couponCode, $yohoCoin) 1156 public static function getPackageInfo($uid, $cartType, $skuList, $orderCode, $sessionKey, $deliveryId, $paymentType, $couponCode, $yohoCoin)
1157 { 1157 {
@@ -1264,7 +1264,7 @@ class CartModel @@ -1264,7 +1264,7 @@ class CartModel
1264 return $result; 1264 return $result;
1265 } 1265 }
1266 1266
1267 - public static function ticketsOrderCompute($uid, $productSku, $buyNumber, $yohoCoin) 1267 + public static function ticketsOrderCompute($uid, $productSku, $buyNumber, $yohoCoin)
1268 { 1268 {
1269 $result = array(); 1269 $result = array();
1270 1270
@@ -612,6 +612,7 @@ class IndexController extends AbstractAction @@ -612,6 +612,7 @@ class IndexController extends AbstractAction
612 } 612 }
613 613
614 $moreUrl = $this->getSession('addressMore'); 614 $moreUrl = $this->getSession('addressMore');
  615 + $moreUrl = !empty($moreUrl) ? $moreUrl : '/cart/index/orderEnsure';
615 $this->setNavHeader('选择地址', $moreUrl, false); 616 $this->setNavHeader('选择地址', $moreUrl, false);
616 617
617 $this->_view->display('select-address', array( 618 $this->_view->display('select-address', array(