浏览代码

暂时恢复tiktok的打印

lvhao 1 天之前
父节点
当前提交
5e7a050b1f
共有 1 个文件被更改,包括 23 次插入20 次删除
  1. 23 20
      core/CoreApp/models/Model_express_tt.php

+ 23 - 20
core/CoreApp/models/Model_express_tt.php

@@ -126,17 +126,20 @@ class Model_express_tt extends Lin_Model {
     private function getFBTPackage($info,$shop_info){
         
         $extra_text = $info['extra_text'];
-        $packages = $extra_text['packages'];
-        if(!isset($extra_text['server_info'])){
-            $rr1 = $this->getExpressCompany($info,$shop_info[0]);
-            if($rr1['x'] == 0){
-                return $rr1;
-            }
-            $info = $rr1['data'];
-            if(is_string($info['extra_text'])){
-                $info['extra_text'] = json_decode($info['extra_text'],true);
-            }
+        if(is_string($extra_text)){
+            $extra_text = json_decode($extra_text,true);
         }
+        $packages = $extra_text['packages'];
+        // if(!isset($extra_text['server_info'])){
+        //     $rr1 = $this->getExpressCompany($info,$shop_info[0]);
+        //     if($rr1['x'] == 0){
+        //         return $rr1;
+        //     }
+        //     $info = $rr1['data'];
+        //     if(is_string($info['extra_text'])){
+        //         $info['extra_text'] = json_decode($info['extra_text'],true);
+        //     }
+        // }
         // 确定没有多包裹的情况 就不再写循环了 直接获取第一个包裹
         // foreach($packages as $package){
         //     $rr = $this->apitt->downloadLabel($package['id'],$shop_info[0],$info);
@@ -151,16 +154,16 @@ class Model_express_tt extends Lin_Model {
         //     }
         // }
 
-        if(!isset($extra_text['label_info'])){
-            $rr2 = $this->createExpressLabel($info,$shop_info[0]);
-            if($rr2['x'] == 0){
-                return $rr2;
-            }
-            $info = $rr2['data'];
-            if(is_string($info['extra_text'])){
-                $info['extra_text'] = json_decode($info['extra_text'],true);
-            }
-        }
+        // if(!isset($extra_text['label_info'])){
+        //     $rr2 = $this->createExpressLabel($info,$shop_info[0]);
+        //     if($rr2['x'] == 0){
+        //         return $rr2;
+        //     }
+        //     $info = $rr2['data'];
+        //     if(is_string($info['extra_text'])){
+        //         $info['extra_text'] = json_decode($info['extra_text'],true);
+        //     }
+        // }
         
         $packageid = $packages[0]['id'];
         $rr = $this->apitt->downloadLabel($packageid,$shop_info[0],$info);