lvhao 5 dienas atpakaļ
vecāks
revīzija
fb9cdfc283
1 mainītis faili ar 27 papildinājumiem un 27 dzēšanām
  1. 27 27
      core/CoreApp/models/Model_express_tt.php

+ 27 - 27
core/CoreApp/models/Model_express_tt.php

@@ -30,17 +30,14 @@ class Model_express_tt extends Lin_Model {
            
            //获取快递服务信息
            $res = $this->getExpressCompany($info,$shop_info[0]);
-           print_r($res);
            if($res['x'] == 0){
                return $res;
            }
            $res1 = $this->createExpressLabel($res['data'],$shop_info[0]);
-           print_r($res1);
            if($res1['x'] == 0){
                return $res1;
            }
            $res2 = $this->downloadExpressLabel($res['data'],$shop_info[0]);
-           print_r($res2);
            if($res2['x'] == 0){
                return $res2;
            }
@@ -215,19 +212,20 @@ class Model_express_tt extends Lin_Model {
    
     //获取订单承运的快递商
     private function getExpressCompany($info,$shop_info){
-        if(is_string($info['extra_text'])){
-            $extra_text = json_decode($info['extra_text'],true);
-        }else{
-            $extra_text = $info['extra_text'];
-        }
-        if(isset($extra_text['server_info'])){
-            return  [
-                'x'=>1,
-                'msg'=>'获取成功',
-                'data'=>$info
-            ];
-        }
+        // if(is_string($info['extra_text'])){
+        //     $extra_text = json_decode($info['extra_text'],true);
+        // }else{
+        //     $extra_text = $info['extra_text'];
+        // }
+        // if(isset($extra_text['server_info'])){
+        //     return  [
+        //         'x'=>1,
+        //         'msg'=>'获取成功',
+        //         'data'=>$info
+        //     ];
+        // }
         $res = $this->apitt->getExpressCompany($info,$shop_info);
+        print_r($res);
         if($res['code'] != 0){
             return  [
                 'x'=>0,
@@ -249,19 +247,20 @@ class Model_express_tt extends Lin_Model {
 
     //创建发货单和运单标签
     private function createExpressLabel($info,$shop_info){
-        if(is_string($info['extra_text'])){
-            $extra_text = json_decode($info['extra_text'],true);
-        }else{
-            $extra_text = $info['extra_text'];
-        }
-        if(isset($extra_text['label_info'])){
-            return  [
-                'x'=>1,
-                'msg'=>'获取成功',
-                'data'=>$info
-            ];
-        }
+        // if(is_string($info['extra_text'])){
+        //     $extra_text = json_decode($info['extra_text'],true);
+        // }else{
+        //     $extra_text = $info['extra_text'];
+        // }
+        // if(isset($extra_text['label_info'])){
+        //     return  [
+        //         'x'=>1,
+        //         'msg'=>'获取成功',
+        //         'data'=>$info
+        //     ];
+        // }
         $res = $this->apitt->createLabel($info,$shop_info);
+        print_r($res);
         if($res['code'] != 0){
             return  [
                 'x'=>0,
@@ -287,6 +286,7 @@ class Model_express_tt extends Lin_Model {
         $extra_text = json_decode($info['extra_text'],true);
         $packageid = $extra_text['label_info']['packageid'];
         $res = $this->apitt->downloadLabel($packageid,$shop,$info);
+        print_r($res);
         if($res['code'] != 0){
             return  [
                 'x'=>0,