Authored by 周少峰

receiver mobile

... ... @@ -226,6 +226,7 @@ class OrderModel
$detail['pdfUrl'] = $orderDetail['invoice']['pdfUrl'];
$detail['title'] = $orderDetail['invoice']['title'];
$detail['contentValue'] = $orderDetail['invoice']['contentValue'];
$detail['showInvoice'] = $orderDetail['invoice']['showInvoice'];
}
$detail['yoho_give_coin'] = $orderDetail['yoho_give_coin'];
... ...
... ... @@ -579,6 +579,9 @@ class CartModel
do {
/* 调接口订单确认接口 */
$pay = CartData::cartPay($uid, $cartType);
//获取用户手机号码用于发票接收人
$userInfo = UserData::getUserInfo($uid);
if (!$pay || empty($pay['data']['goods_list'])) {
break;
}
... ... @@ -703,7 +706,7 @@ class CartModel
$build['name'] = $value['invoices_type_name'];
$result['piaoTypes'][] = $build;
}
$result['receiverMobile'] = isset($pay['data']['delivery_address']['mobile']) ? $pay['data']['delivery_address']['mobile'] : '';
$result['receiverMobile'] = isset($userInfo['data']['mobile']) && $userInfo['data']['mobile'] ? $userInfo['data']['mobile'] : '';
}
/* 需购买的商品 */
... ...
... ... @@ -115,7 +115,7 @@ class OrdersController extends WebAction
//发票信息
'invoiceMode' => $detail['invoiceMode'],
'invoiceType' => $detail['invoiceType'] === 2 ? '电子发票' : '纸质发票',
'pdfUrl' => $detail['pdfUrl'],
'pdfUrl' => $detail['showInvoice'] && $detail['pdfUrl'] ? $detail['pdfUrl'] : '',
'title' => $detail['title'],
'contentValue' => $detail['contentValue'] ? $detail['contentValue'] : '个人',
);
... ...