Authored by 周少峰

Merge branch 'release/4.8' of http://git.yoho.cn/fe/yohobuywap into release/4.8

... ... @@ -413,9 +413,5 @@ if (orderInfo('address') && orderInfo('address').is_support === 'N') {
orderCompute();
}
orderInfo('address', {
address_id: $('.address-wrap').attr('data-id')
});
// 初始化发票信息内容
invoiceInit();
\ No newline at end of file
... ...
... ... @@ -335,7 +335,7 @@ class IndexController extends AbstractAction
return;
}
$userData = UserData::userData($uid);
$userMobile = empty($userData['data']) || empty($userData['data']['mobile']) ? '' : $userData['data']['mobile']; //用户手机
$mobile = empty($userData['data']) || empty($userData['data']['mobile']) ? '' : $userData['data']['mobile']; //用户手机
$addresslist = UserData::addressTextData($uid); //获取地址列表
//获取所选地址的手机号码
if (isset($orderInfo['address']) && !empty($orderInfo['address'])) {
... ... @@ -343,9 +343,6 @@ class IndexController extends AbstractAction
if ($addresskey['address_id'] == $orderInfo['address']['address_id'])
$mobile = $addresskey['mobile'];
}
}else {
//获取用户手机号码
$mobile = $userMobile;
}
$data = array(
'orderEnsurePage' => true,
... ... @@ -377,7 +374,7 @@ class IndexController extends AbstractAction
$mobile = $userMobile;
$addresslist = UserData::addressTextData($uid); //获取地址列表
do{
if (empty($orderInfo['receiverMobile']) && !isset($orderInfo['address']['address_id'])) {
if (empty($orderInfo['receiverMobile']) && !isset($orderInfo['addressId']) &&empty($orderInfo['addressId'])) {
break;
}
//用户手动修改号码后直接去修改后号码
... ... @@ -387,26 +384,22 @@ class IndexController extends AbstractAction
else {
//未手动修改获取用户所选地址的手机号码
foreach ($addresslist['data'] as $addresskey) {
if ($addresskey['address_id'] == $orderInfo['address']['address_id'])
if ($addresskey['address_id'] == Encryption::decrypt($orderInfo['addressId']))
{
$mobile = $addresskey['mobile'];
}
}
}
while(false);
}
while(false);
if (!empty($orderInfo['invoiceType']) && !empty($orderInfo['invoiceTitle'])) {
$invoiceType = $orderInfo['invoiceType']; //发票类型ID
$invoices_type = $orderInfo['invoicesType'] * 1; //发票类型 /**纸质 1 ,电子 2 */
//$mobile = $orderInfo['receiverMobile']; //用户号码
$invoices_title = $orderInfo['invoiceText']; //发票抬头
$invoice_Top = $orderInfo['invoiceTitle']; //单位 个人
}
else {
//获取用户所选地址的手机号码
// foreach ($addresslist['data'] as $addresskey) {
// if ($addresskey['address_id'] == $orderInfo['address']['address_id'])
// $mobile = $addresskey['mobile'];
// }
$invoices_title = '';
$invoiceType = '7'; //发票类型ID
$invoices_type = '2'; //发票类型 /**纸质 1 ,电子 2 */
... ...