|
@@ -232,21 +232,19 @@ class IndexController extends BaseController |
|
@@ -232,21 +232,19 @@ 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
|
+ $param = [
|
|
238
|
'page' => $this->page,
|
236
|
'page' => $this->page,
|
|
239
|
'pagesize' => $this->row,
|
237
|
'pagesize' => $this->row,
|
|
240
|
- 'token' => 'MT0CM7y4tdFTFTm'
|
|
|
|
241
|
- ]);
|
238
|
+ 'token' => 'MT0CM7y4tdFTFTm',
|
|
|
|
239
|
+ 'pr_id' => $this->param['pr_id'],
|
|
|
|
240
|
+ 'release_time_start'=>$this->param['release_time_start'],
|
|
|
|
241
|
+ 'release_time_end'=>$this->param['release_time_end'],
|
|
|
|
242
|
+ ];
|
|
|
|
243
|
+ $param = array_filter($param);
|
|
|
|
244
|
+ $response = Http::withHeaders(['Accept' => 'application/json',])->get($url, $param);
|
|
242
|
if ($response->successful()) {
|
245
|
if ($response->successful()) {
|
|
243
|
$result = $response->json();
|
246
|
$result = $response->json();
|
|
244
|
- $this->response('success', Code::SUCCESS, [
|
|
|
|
245
|
- 'url' => $url,
|
|
|
|
246
|
- 'list' => $result,
|
|
|
|
247
|
- 'page' => $this->page,
|
|
|
|
248
|
- 'pagesize' => $this->row
|
|
|
|
249
|
- ]);
|
247
|
+ $this->response('success', Code::SUCCESS, ['url' => $url, 'list' => $result, 'page' => $this->page, 'pagesize' => $this->row]);
|
|
250
|
} else {
|
248
|
} else {
|
|
251
|
$this->response('请求失败', Code::SYSTEM_ERROR, ['status_code' => $response->status(), 'error' => $response->body()]);
|
249
|
$this->response('请求失败', Code::SYSTEM_ERROR, ['status_code' => $response->status(), 'error' => $response->body()]);
|
|
252
|
}
|
250
|
}
|