Quellcode durchsuchen

ita物流调试

zhangdehua vor 1 Jahr
Ursprung
Commit
f6406235d1
1 geänderte Dateien mit 2 neuen und 2 gelöschten Zeilen
  1. 2 2
      app/common/library/express/Usps.php

+ 2 - 2
app/common/library/express/Usps.php

@@ -161,9 +161,9 @@ class Usps
 
             $url = 'http://f1.itdida.com/itdida-api/login?' . http_build_query($params);
             $header = ['Content-Type: application/x-www-form-urlencode'];
-            $res = curl_post($url, [], $header);
+            $resJson = curl_post($url, [], $header);
             //$resJson = '{"data":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhODFiMzZkNGYwZDUxMWVlODM1YjViMWQ1MmE0NjcxNSIsImNyZWF0ZWQiOjE3MTM0OTc1MzQ1MDEsInJvbGVzIjpbeyJhdXRob3JpdHkiOiJST0xFX0tFSFUifV0sImRvbWFpbiI6ImYxIiwiZXhwIjoxNzEzNjcwMzM0fQ.bMVc3E2pTJFA0wztgizsXpqexD65TH471lRpj92jqgVKx2-q2qqhevUMRmZ73c2TQihDVXvmjlaNp0dPdEgZDg","statusCode":200,"success":true}';
-            //$res = json_decode($resJson, true);
+            $res = json_decode($resJson, true);
             if (isset($res['statusCode']) && $res['statusCode'] == 200 && $res['success']) {
                 Cache::set('ItdidaToken', $res['data'], 169200);
                 return $res['data'];