|
...
|
...
|
@@ -61,23 +61,23 @@ class Ticket5UploadDataController extends BaseController |
|
|
|
$this->response('未知请求',Code::SYSTEM_ERROR);
|
|
|
|
}
|
|
|
|
$url = $projectInfo['website'].'wp-admin/admin-ajax.php?action='.$action;
|
|
|
|
$data = http_get($url);
|
|
|
|
$response = Http::withHeaders([])->asForm()->get($url);
|
|
|
|
if ($response->successful()) {
|
|
|
|
$result = $response->json(); // 获取 JSON 响应体
|
|
|
|
if ($result && $result['status'] == 200) {
|
|
|
|
$resultData = $data['data'];
|
|
|
|
@file_put_contents(storage_path('logs/lyh_error.log'), var_export($result, true) . PHP_EOL, FILE_APPEND);
|
|
|
|
$resultData = $result['data'];
|
|
|
|
$saveData = [
|
|
|
|
'project_id' => $projectInfo['post_id'],
|
|
|
|
'domain' => $projectInfo['website'],
|
|
|
|
'text'=>json_encode($data['data']),
|
|
|
|
'text'=>json_encode($result['data']),
|
|
|
|
'type' => $this->param['type'],
|
|
|
|
];
|
|
|
|
$project5CateModel->addReturnId($saveData);
|
|
|
|
$this->response('success', Code::SUCCESS,$resultData);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@file_put_contents(storage_path('logs/lyh_error.log'), var_export($data, true) . PHP_EOL, FILE_APPEND);
|
|
|
|
|
|
|
|
$this->response('success',Code::SUCCESS,$url);
|
|
|
|
}
|
|
|
|
|
...
|
...
|
|