正在显示
1 个修改的文件
包含
2 行增加
和
9 行删除
| @@ -232,21 +232,14 @@ class IndexController extends BaseController | @@ -232,21 +232,14 @@ class IndexController extends BaseController | ||
| 232 | public function prInfoDownload() | 232 | public function prInfoDownload() |
| 233 | { | 233 | { |
| 234 | $url = 'http://crawl.scraper.waimaoq.com/export/issuewire'; | 234 | $url = 'http://crawl.scraper.waimaoq.com/export/issuewire'; |
| 235 | - $response = Http::withHeaders([ | ||
| 236 | - 'Accept' => 'application/json', | ||
| 237 | - ])->get($url, [ | 235 | + $response = Http::withHeaders(['Accept' => 'application/json',])->get($url, [ |
| 238 | 'page' => $this->page, | 236 | 'page' => $this->page, |
| 239 | 'pagesize' => $this->row, | 237 | 'pagesize' => $this->row, |
| 240 | 'token' => 'MT0CM7y4tdFTFTm' | 238 | 'token' => 'MT0CM7y4tdFTFTm' |
| 241 | ]); | 239 | ]); |
| 242 | if ($response->successful()) { | 240 | if ($response->successful()) { |
| 243 | $result = $response->json(); | 241 | $result = $response->json(); |
| 244 | - $this->response('success', Code::SUCCESS, [ | ||
| 245 | - 'url' => $url, | ||
| 246 | - 'list' => $result, | ||
| 247 | - 'page' => $this->page, | ||
| 248 | - 'pagesize' => $this->row | ||
| 249 | - ]); | 242 | + $this->response('success', Code::SUCCESS, ['url' => $url, 'list' => $result, 'page' => $this->page, 'pagesize' => $this->row]); |
| 250 | } else { | 243 | } else { |
| 251 | $this->response('请求失败', Code::SYSTEM_ERROR, ['status_code' => $response->status(), 'error' => $response->body()]); | 244 | $this->response('请求失败', Code::SYSTEM_ERROR, ['status_code' => $response->status(), 'error' => $response->body()]); |
| 252 | } | 245 | } |
-
请 注册 或 登录 后发表评论