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') { @@ -413,9 +413,5 @@ if (orderInfo('address') && orderInfo('address').is_support === 'N') {
413 orderCompute(); 413 orderCompute();
414 } 414 }
415 415
416 -orderInfo('address', {  
417 - address_id: $('.address-wrap').attr('data-id')  
418 -});  
419 -  
420 // 初始化发票信息内容 416 // 初始化发票信息内容
421 invoiceInit(); 417 invoiceInit();
@@ -335,7 +335,7 @@ class IndexController extends AbstractAction @@ -335,7 +335,7 @@ class IndexController extends AbstractAction
335 return; 335 return;
336 } 336 }
337 $userData = UserData::userData($uid); 337 $userData = UserData::userData($uid);
338 - $userMobile = empty($userData['data']) || empty($userData['data']['mobile']) ? '' : $userData['data']['mobile']; //用户手机 338 + $mobile = empty($userData['data']) || empty($userData['data']['mobile']) ? '' : $userData['data']['mobile']; //用户手机
339 $addresslist = UserData::addressTextData($uid); //获取地址列表 339 $addresslist = UserData::addressTextData($uid); //获取地址列表
340 //获取所选地址的手机号码 340 //获取所选地址的手机号码
341 if (isset($orderInfo['address']) && !empty($orderInfo['address'])) { 341 if (isset($orderInfo['address']) && !empty($orderInfo['address'])) {
@@ -343,9 +343,6 @@ class IndexController extends AbstractAction @@ -343,9 +343,6 @@ class IndexController extends AbstractAction
343 if ($addresskey['address_id'] == $orderInfo['address']['address_id']) 343 if ($addresskey['address_id'] == $orderInfo['address']['address_id'])
344 $mobile = $addresskey['mobile']; 344 $mobile = $addresskey['mobile'];
345 } 345 }
346 - }else {  
347 - //获取用户手机号码  
348 - $mobile = $userMobile;  
349 } 346 }
350 $data = array( 347 $data = array(
351 'orderEnsurePage' => true, 348 'orderEnsurePage' => true,
@@ -377,7 +374,7 @@ class IndexController extends AbstractAction @@ -377,7 +374,7 @@ class IndexController extends AbstractAction
377 $mobile = $userMobile; 374 $mobile = $userMobile;
378 $addresslist = UserData::addressTextData($uid); //获取地址列表 375 $addresslist = UserData::addressTextData($uid); //获取地址列表
379 do{ 376 do{
380 - if (empty($orderInfo['receiverMobile']) && !isset($orderInfo['address']['address_id'])) { 377 + if (empty($orderInfo['receiverMobile']) && !isset($orderInfo['addressId']) &&empty($orderInfo['addressId'])) {
381 break; 378 break;
382 } 379 }
383 //用户手动修改号码后直接去修改后号码 380 //用户手动修改号码后直接去修改后号码
@@ -387,26 +384,22 @@ class IndexController extends AbstractAction @@ -387,26 +384,22 @@ class IndexController extends AbstractAction
387 else { 384 else {
388 //未手动修改获取用户所选地址的手机号码 385 //未手动修改获取用户所选地址的手机号码
389 foreach ($addresslist['data'] as $addresskey) { 386 foreach ($addresslist['data'] as $addresskey) {
390 - if ($addresskey['address_id'] == $orderInfo['address']['address_id']) 387 + if ($addresskey['address_id'] == Encryption::decrypt($orderInfo['addressId']))
  388 + {
391 $mobile = $addresskey['mobile']; 389 $mobile = $addresskey['mobile'];
392 } 390 }
393 } 391 }
394 } 392 }
395 - while(false); 393 + }
396 394
  395 + while(false);
397 if (!empty($orderInfo['invoiceType']) && !empty($orderInfo['invoiceTitle'])) { 396 if (!empty($orderInfo['invoiceType']) && !empty($orderInfo['invoiceTitle'])) {
398 $invoiceType = $orderInfo['invoiceType']; //发票类型ID 397 $invoiceType = $orderInfo['invoiceType']; //发票类型ID
399 $invoices_type = $orderInfo['invoicesType'] * 1; //发票类型 /**纸质 1 ,电子 2 */ 398 $invoices_type = $orderInfo['invoicesType'] * 1; //发票类型 /**纸质 1 ,电子 2 */
400 - //$mobile = $orderInfo['receiverMobile']; //用户号码  
401 $invoices_title = $orderInfo['invoiceText']; //发票抬头 399 $invoices_title = $orderInfo['invoiceText']; //发票抬头
402 $invoice_Top = $orderInfo['invoiceTitle']; //单位 个人 400 $invoice_Top = $orderInfo['invoiceTitle']; //单位 个人
403 } 401 }
404 else { 402 else {
405 - //获取用户所选地址的手机号码  
406 - // foreach ($addresslist['data'] as $addresskey) {  
407 - // if ($addresskey['address_id'] == $orderInfo['address']['address_id'])  
408 - // $mobile = $addresskey['mobile'];  
409 - // }  
410 $invoices_title = ''; 403 $invoices_title = '';
411 $invoiceType = '7'; //发票类型ID 404 $invoiceType = '7'; //发票类型ID
412 $invoices_type = '2'; //发票类型 /**纸质 1 ,电子 2 */ 405 $invoices_type = '2'; //发票类型 /**纸质 1 ,电子 2 */