Authored by 郭成尧

'价格添加.00'

@@ -500,9 +500,9 @@ class CartModel @@ -500,9 +500,9 @@ class CartModel
500 $build['title'] = $value['product_name']; 500 $build['title'] = $value['product_name'];
501 $build['img'] = Helpers::getImageUrl($value['default_images'], 100, 100); 501 $build['img'] = Helpers::getImageUrl($value['default_images'], 100, 100);
502 $build['alt'] = $value['product_name']; 502 $build['alt'] = $value['product_name'];
503 - $build['price'] = $value['sales_price']; 503 + $build['price'] = strstr(strval($value['sales_price']), '.') ? $value['sales_price'] : $value['sales_price'] . '.00';
504 if ($value['sales_price'] !== ['market_price']) { 504 if ($value['sales_price'] !== ['market_price']) {
505 - $build['marketPrice'] = $value['market_price']; 505 + $build['marketPrice'] = strstr(strval($value['market_price']), '.') ? $value['market_price'] : $value['market_price'] . '.00';
506 } 506 }
507 507
508 $result['data']['item'][] = $build; 508 $result['data']['item'][] = $build;
@@ -1009,7 +1009,7 @@ class CartModel @@ -1009,7 +1009,7 @@ class CartModel
1009 * @param int $redEnvelopes 红包 1009 * @param int $redEnvelopes 红包
1010 * @return array 接口返回的数据 1010 * @return array 接口返回的数据
1011 */ 1011 */
1012 - public static function orderSub($uid, $addressId, $cartType, $deliveryTimeId, $deliveryWayId, $invoiceType, $invoiceTitle, $invoiceContent, $receiverMobile, $paymentId, $paymentType, $remark, $couponCode,$promotionCode, $yohoCoin, $isPreContact, $isPrintPrice, $redEnvelopes) 1012 + public static function orderSub($uid, $addressId, $cartType, $deliveryTimeId, $deliveryWayId, $invoiceType, $invoiceTitle, $invoiceContent, $receiverMobile, $paymentId, $paymentType, $remark, $couponCode, $promotionCode, $yohoCoin, $isPreContact, $isPrintPrice, $redEnvelopes)
1013 { 1013 {
1014 $result = array('code' => 400, 'message' => self::ERROR_400_MESSAGE); 1014 $result = array('code' => 400, 'message' => self::ERROR_400_MESSAGE);
1015 1015
@@ -1050,7 +1050,7 @@ class CartModel @@ -1050,7 +1050,7 @@ class CartModel
1050 $userAgent = isset($unionInfo['client_id']) ? 'YOHO!Buy/3.8.2.259(Model/PC;Channel/' . $unionInfo['client_id'] . ';uid/' . $uid . ')' : null; 1050 $userAgent = isset($unionInfo['client_id']) ? 'YOHO!Buy/3.8.2.259(Model/PC;Channel/' . $unionInfo['client_id'] . ';uid/' . $uid . ')' : null;
1051 } 1051 }
1052 1052
1053 - $orderSubRes = CartData::orderSub($uid, $addressId, $cartType, $deliveryTimeId, $deliveryWayId, $invoiceType, $invoiceTitle, $invoiceContent, $receiverMobile, $paymentId, $paymentType, $remark, $couponCode,$promotionCode,$yohoCoin, $isPreContact, $isPrintPrice,$unionKey,$userAgent, $redEnvelopes); 1053 + $orderSubRes = CartData::orderSub($uid, $addressId, $cartType, $deliveryTimeId, $deliveryWayId, $invoiceType, $invoiceTitle, $invoiceContent, $receiverMobile, $paymentId, $paymentType, $remark, $couponCode, $promotionCode, $yohoCoin, $isPreContact, $isPrintPrice, $unionKey, $userAgent, $redEnvelopes);
1054 if ($orderSubRes && isset($orderSubRes['code'])) { 1054 if ($orderSubRes && isset($orderSubRes['code'])) {
1055 $result = $orderSubRes; 1055 $result = $orderSubRes;
1056 } 1056 }