cqp 2 天之前
父節點
當前提交
ed31339bb1
共有 1 個文件被更改,包括 2 次插入4 次删除
  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'];