Authored by cailing

电子发票手机号码带入修改

@@ -334,8 +334,12 @@ class IndexController extends AbstractAction @@ -334,8 +334,12 @@ class IndexController extends AbstractAction
334 $this->echoJson($order); 334 $this->echoJson($order);
335 return; 335 return;
336 } 336 }
337 - $userData = UserData::userData($uid);  
338 - $mobile = empty($userData['data']) || empty($userData['data']['mobile']) ? '' : $userData['data']['mobile']; //发票人手机 337 + $addresslist = UserData::addressTextData($uid); //获取地址列表
  338 + //获取所选地址的手机号码
  339 + foreach ($addresslist['data'] as $addresskey) {
  340 + if ($addresskey['address_id'] == $orderInfo['address']['address_id'])
  341 + $mobile = $addresskey['mobile'];
  342 + }
339 $data = array( 343 $data = array(
340 'orderEnsurePage' => true, 344 'orderEnsurePage' => true,
341 'isOrdinaryCart' => ($cartType !== 'advance'), 345 'isOrdinaryCart' => ($cartType !== 'advance'),
@@ -364,9 +368,9 @@ class IndexController extends AbstractAction @@ -364,9 +368,9 @@ class IndexController extends AbstractAction
364 if (!empty($orderInfo['receiverMobile']) && !empty($orderInfo['invoiceType']) && !empty($orderInfo['invoiceTitle'])) { 368 if (!empty($orderInfo['receiverMobile']) && !empty($orderInfo['invoiceType']) && !empty($orderInfo['invoiceTitle'])) {
365 $invoiceType = $orderInfo['invoiceType']; //发票类型ID 369 $invoiceType = $orderInfo['invoiceType']; //发票类型ID
366 $invoices_type = $orderInfo['invoicesType'] * 1; //发票类型 /**纸质 1 ,电子 2 */ 370 $invoices_type = $orderInfo['invoicesType'] * 1; //发票类型 /**纸质 1 ,电子 2 */
367 - $mobile = $orderInfo['receiverMobile'];//用户号码 371 + $mobile = $orderInfo['receiverMobile']; //用户号码
368 $invoices_title = $orderInfo['invoiceText']; //发票抬头 372 $invoices_title = $orderInfo['invoiceText']; //发票抬头
369 - $invoice_Top = $orderInfo['invoiceTitle'];//单位 个人 373 + $invoice_Top = $orderInfo['invoiceTitle']; //单位 个人
370 } 374 }
371 else { 375 else {
372 //获取用户所选地址的手机号码 376 //获取用户所选地址的手机号码
@@ -379,13 +383,13 @@ class IndexController extends AbstractAction @@ -379,13 +383,13 @@ class IndexController extends AbstractAction
379 $invoices_type = '2'; //发票类型 /**纸质 1 ,电子 2 */ 383 $invoices_type = '2'; //发票类型 /**纸质 1 ,电子 2 */
380 $invoice_Top = '个人'; 384 $invoice_Top = '个人';
381 } 385 }
382 - 386 +
383 $data = array( 387 $data = array(
384 'invoiceInfoPage' => true, 388 'invoiceInfoPage' => true,
385 'invoiceNotice' => '发票须知', 389 'invoiceNotice' => '发票须知',
386 'phone' => $mobile ? substr_replace($mobile, '****', 3, 4) : '', 390 'phone' => $mobile ? substr_replace($mobile, '****', 3, 4) : '',
387 'completeTel' => $mobile, 391 'completeTel' => $mobile,
388 - 'isCompany' => $invoice_Top =='单位' ? false : true, 392 + 'isCompany' => $invoice_Top == '单位' ? false : true,
389 'companyName' => $invoices_title, 393 'companyName' => $invoices_title,
390 'isPaper' => $invoices_type == 1 ? true : false, 394 'isPaper' => $invoices_type == 1 ? true : false,
391 'invoicesType' => array( 395 'invoicesType' => array(
@@ -403,7 +407,7 @@ class IndexController extends AbstractAction @@ -403,7 +407,7 @@ class IndexController extends AbstractAction
403 'invoiceTitle' => array( 407 'invoiceTitle' => array(
404 array( 408 array(
405 'type' => '个人', 409 'type' => '个人',
406 - 'choosed' =>$invoice_Top == '个人'? true : false, 410 + 'choosed' => $invoice_Top == '个人' ? true : false,
407 ), 411 ),
408 array( 412 array(
409 'type' => '单位', 413 'type' => '单位',
@@ -585,8 +589,8 @@ class IndexController extends AbstractAction @@ -585,8 +589,8 @@ class IndexController extends AbstractAction
585 $userAgent = null; 589 $userAgent = null;
586 $unionKey = ''; 590 $unionKey = '';
587 if (!empty($_COOKIE['mkt_code']) || !empty($_COOKIE['_QYH_UNION'])) { 591 if (!empty($_COOKIE['mkt_code']) || !empty($_COOKIE['_QYH_UNION'])) {
588 - /* 解密客户端联盟信息 mkt_code优先*/  
589 - $unionKey = !empty($_COOKIE['mkt_code']) ? '{"client_id": 800'.$_COOKIE['mkt_code'].'}' : AuthCode::decode($_COOKIE['_QYH_UNION'], 'q_union_yohobuy'); 592 + /* 解密客户端联盟信息 mkt_code优先 */
  593 + $unionKey = !empty($_COOKIE['mkt_code']) ? '{"client_id": 800' . $_COOKIE['mkt_code'] . '}' : AuthCode::decode($_COOKIE['_QYH_UNION'], 'q_union_yohobuy');
590 /* 检查联盟参数是否有效 */ 594 /* 检查联盟参数是否有效 */
591 $unionInfo = empty($unionKey) ? array() : json_decode($unionKey, true); 595 $unionInfo = empty($unionKey) ? array() : json_decode($unionKey, true);
592 /* 模拟APP的User-Agent */ 596 /* 模拟APP的User-Agent */
@@ -600,7 +604,7 @@ class IndexController extends AbstractAction @@ -600,7 +604,7 @@ class IndexController extends AbstractAction
600 . ',deliveryWay:' . $deliveryWay . 'invoiceTitle:' . $invoiceTitle . ',invoiceId:' . $invoiceId . ',yohoCoin:' . $yohoCoin 604 . ',deliveryWay:' . $deliveryWay . 'invoiceTitle:' . $invoiceTitle . ',invoiceId:' . $invoiceId . ',yohoCoin:' . $yohoCoin
601 . ',paymentId:' . $paymentId . ',paymentType:' . $paymentType . ',remark:' . $remark . ',couponCode:' . $couponCode . "\n"; 605 . ',paymentId:' . $paymentId . ',paymentType:' . $paymentType . ',remark:' . $remark . ',couponCode:' . $couponCode . "\n";
602 error_log($message, 3, '/Data/logs/php/h5_error/order.' . date('Ym') . '.log'); 606 error_log($message, 3, '/Data/logs/php/h5_error/order.' . date('Ym') . '.log');
603 - UdpLog::info('【下单】下单异常数据','message:'.$message,'返回:'.json_encode($result)); 607 + UdpLog::info('【下单】下单异常数据', 'message:' . $message, '返回:' . json_encode($result));
604 } 608 }
605 // 返回数据 609 // 返回数据
606 else { 610 else {