Showing
2 changed files
with
4 additions
and
2 deletions
@@ -344,7 +344,7 @@ function submitOrder(times) { | @@ -344,7 +344,7 @@ function submitOrder(times) { | ||
344 | ORDER_CODE: res.data.order_code, | 344 | ORDER_CODE: res.data.order_code, |
345 | PRD_NUM: $('#goods-num').val(), | 345 | PRD_NUM: $('#goods-num').val(), |
346 | ORDER_AMOUNT: res.data.order_amount, | 346 | ORDER_AMOUNT: res.data.order_amount, |
347 | - UNIONCOOKIE: res.data.unionCookie || '', | 347 | + UNIONCOOKIE: encodeURIComponent(res.data.unionCookie + '') || '', |
348 | PRD_SKN: PRD_SKN.join(','), | 348 | PRD_SKN: PRD_SKN.join(','), |
349 | PRD_SKU: PRD_SKU.join(',') | 349 | PRD_SKU: PRD_SKU.join(',') |
350 | }) | 350 | }) |
@@ -681,7 +681,9 @@ class IndexController extends AbstractAction | @@ -681,7 +681,9 @@ class IndexController extends AbstractAction | ||
681 | $result = CartModel::orderSub($uid, $addressId, $cartType, $deliveryTime, $deliveryWay, $invoices, $paymentId, $paymentType, $remark, $couponCode, $yohoCoin, $skuList, $unionKey, $userAgent, $times); | 681 | $result = CartModel::orderSub($uid, $addressId, $cartType, $deliveryTime, $deliveryWay, $invoices, $paymentId, $paymentType, $remark, $couponCode, $yohoCoin, $skuList, $unionKey, $userAgent, $times); |
682 | 682 | ||
683 | if (!empty($unionInfo)) { | 683 | if (!empty($unionInfo)) { |
684 | - $result['data']['unionCookie'] = $unionInfo; | 684 | + $before = array(" "," ","\t","\n","\r"); |
685 | + $after = array("","","","",""); | ||
686 | + $result['data']['unionCookie'] = str_replace($before, $after, json_encode($unionInfo)); | ||
685 | } | 687 | } |
686 | 688 | ||
687 | // 记录下单异常的数据 | 689 | // 记录下单异常的数据 |
-
Please register or login to post a comment