cqp 2 zile în urmă
părinte
comite
ed31339bb1
1 a modificat fișierele cu 2 adăugiri și 4 ștergeri
  1. 2 4
      app/Service/TestService.php

+ 2 - 4
app/Service/TestService.php

@@ -771,8 +771,7 @@ class TestService extends Service
         $final_data = [$tmp];
 
         // 4. 调用 API
-        $host = $msg['host'] ?? "";
-        $token = $msg['token'] ?? "";
+        list($host, $token) = $msg;
         $header = ["Authorization: {$token}", 'Content-Type:application/json'];
         $url = $host . "/api/PurchaseIn/Add";
 
@@ -852,8 +851,7 @@ class TestService extends Service
         $final_data = [$tmp];
 
         //调用所需
-        $host = $msg['host'] ?? "";
-        $token = $msg['token'] ?? "";
+        list($host, $token) = $msg;
 
         //产成品入库单生成
         $header = ["Authorization: {$token}",'Content-Type:application/json'];