zxhxx 3 yıl önce
ebeveyn
işleme
4b7db66c8c

+ 2 - 2
extend/liuniu/HttpService.php

@@ -120,9 +120,9 @@ class HttpService
      * @param int $timeout 超时秒数
      * @return bool|string
      */
-    public static function postRequest($url, array $data = array(), $header = false, $timeout = 10)
+    public static function postRequest($url, array $data = array(), $header = false, $timeout = 10,$type="array")
     {
-        return self::request($url, 'post', $data, $header, $timeout);
+        return self::request($url, 'post', $data, $header, $timeout,$type);
     }
 
     /**

+ 1 - 1
extend/liuniu/UtilService.php

@@ -172,7 +172,7 @@ class UtilService
             $data['path'] = $param['path'];
             $data['query'] = $param['query'];
             $data['is_expire'] = false;
-            $res = HttpService::postRequest($url, $data);
+            $res = HttpService::postRequest($url, $data,false,10,'json');
             $res = file_get_contents($url);
             cache('link_' . $cid,json_decode($res,true));
         }