Showing
3 changed files
with
6 additions
and
2 deletions
@@ -226,6 +226,7 @@ class OrderModel | @@ -226,6 +226,7 @@ class OrderModel | ||
226 | $detail['pdfUrl'] = $orderDetail['invoice']['pdfUrl']; | 226 | $detail['pdfUrl'] = $orderDetail['invoice']['pdfUrl']; |
227 | $detail['title'] = $orderDetail['invoice']['title']; | 227 | $detail['title'] = $orderDetail['invoice']['title']; |
228 | $detail['contentValue'] = $orderDetail['invoice']['contentValue']; | 228 | $detail['contentValue'] = $orderDetail['invoice']['contentValue']; |
229 | + $detail['showInvoice'] = $orderDetail['invoice']['showInvoice']; | ||
229 | } | 230 | } |
230 | 231 | ||
231 | $detail['yoho_give_coin'] = $orderDetail['yoho_give_coin']; | 232 | $detail['yoho_give_coin'] = $orderDetail['yoho_give_coin']; |
@@ -579,6 +579,9 @@ class CartModel | @@ -579,6 +579,9 @@ class CartModel | ||
579 | do { | 579 | do { |
580 | /* 调接口订单确认接口 */ | 580 | /* 调接口订单确认接口 */ |
581 | $pay = CartData::cartPay($uid, $cartType); | 581 | $pay = CartData::cartPay($uid, $cartType); |
582 | + //获取用户手机号码用于发票接收人 | ||
583 | + $userInfo = UserData::getUserInfo($uid); | ||
584 | + | ||
582 | if (!$pay || empty($pay['data']['goods_list'])) { | 585 | if (!$pay || empty($pay['data']['goods_list'])) { |
583 | break; | 586 | break; |
584 | } | 587 | } |
@@ -703,7 +706,7 @@ class CartModel | @@ -703,7 +706,7 @@ class CartModel | ||
703 | $build['name'] = $value['invoices_type_name']; | 706 | $build['name'] = $value['invoices_type_name']; |
704 | $result['piaoTypes'][] = $build; | 707 | $result['piaoTypes'][] = $build; |
705 | } | 708 | } |
706 | - $result['receiverMobile'] = isset($pay['data']['delivery_address']['mobile']) ? $pay['data']['delivery_address']['mobile'] : ''; | 709 | + $result['receiverMobile'] = isset($userInfo['data']['mobile']) && $userInfo['data']['mobile'] ? $userInfo['data']['mobile'] : ''; |
707 | } | 710 | } |
708 | 711 | ||
709 | /* 需购买的商品 */ | 712 | /* 需购买的商品 */ |
@@ -115,7 +115,7 @@ class OrdersController extends WebAction | @@ -115,7 +115,7 @@ class OrdersController extends WebAction | ||
115 | //发票信息 | 115 | //发票信息 |
116 | 'invoiceMode' => $detail['invoiceMode'], | 116 | 'invoiceMode' => $detail['invoiceMode'], |
117 | 'invoiceType' => $detail['invoiceType'] === 2 ? '电子发票' : '纸质发票', | 117 | 'invoiceType' => $detail['invoiceType'] === 2 ? '电子发票' : '纸质发票', |
118 | - 'pdfUrl' => $detail['pdfUrl'], | 118 | + 'pdfUrl' => $detail['showInvoice'] && $detail['pdfUrl'] ? $detail['pdfUrl'] : '', |
119 | 'title' => $detail['title'], | 119 | 'title' => $detail['title'], |
120 | 'contentValue' => $detail['contentValue'] ? $detail['contentValue'] : '个人', | 120 | 'contentValue' => $detail['contentValue'] ? $detail['contentValue'] : '个人', |
121 | ); | 121 | ); |
-
Please register or login to post a comment