作者 karlet

feat:修改签名方式

@@ -134,9 +134,13 @@ class Api @@ -134,9 +134,13 @@ class Api
134 $header = []; 134 $header = [];
135 $body = ''; 135 $body = '';
136 $fullPath = $path; 136 $fullPath = $path;
137 - if ($method == 'GET' && count($param) > 0) { 137 + if ($method == 'GET') {
  138 + if (count($param) > 0) {
138 $fullPath = $path . '?' . http_build_query($param); 139 $fullPath = $path . '?' . http_build_query($param);
139 } else { 140 } else {
  141 + $fullPath = $path;
  142 + }
  143 + } else {
140 $header[] = 'Content-Type: application/json'; 144 $header[] = 'Content-Type: application/json';
141 $body = json_encode($param); 145 $body = json_encode($param);
142 } 146 }