lvhao 17 godzin temu
rodzic
commit
068526419d
1 zmienionych plików z 18 dodań i 0 usunięć
  1. 18 0
      core/CoreApp/controllers/Returns.php

+ 18 - 0
core/CoreApp/controllers/Returns.php

@@ -876,6 +876,24 @@ class Returns extends Start_Controller {
 			$action = $this->input->post('action',true);
 			if($action == 'getinfobywaybill'){
 				$waybill = $this->input->post('waybill',true);
+				if(empty($waybill)){
+					echo json_encode(['code'=>-1,'msg'=>'快递单号不能为空']);exit;
+				}
+				$waybill = trim($waybill);
+				if(substr($waybill,0,3) == '788' && substr($waybill,-4,4) == '0430')//Fedex联邦
+				{
+					$waybill = substr($waybill,0,12);
+				}
+				if(strlen($waybill) == '34')//联邦杭州超长运单截取
+				{
+					$str  = substr($waybill, 0,3);
+					if($str == "420"){
+						$waybill = substr($waybill,12);
+					}else{
+						$waybill = substr($waybill,22,12);
+					}
+					
+				}
 				$info = $this->returns->find("torderinfo = '$waybill'");
 
 				$returnsimg = explode('|',$info['img']);