作者 lyh

变更数据

... ... @@ -176,7 +176,7 @@ class TicketUploadDataLogic extends BaseLogic
}else{
if($this->param['status'] == $this->model::STATUS_SUCCESS){
$ticketProjectMdoel = new TicketProject();
$projectInfo = $ticketProjectMdoel->read(['post_id' => $info['post_id']]);
$projectInfo = $ticketProjectMdoel->read(['post_id' => $info['project_id']]);
if($projectInfo === false){
$this->fail('当前项目不存在或数据未同步');
}
... ... @@ -207,13 +207,15 @@ class TicketUploadDataLogic extends BaseLogic
public function save5ProductData($info,$url){
$response = Http::withHeaders([])->asForm()->post($url, [
'title' => $info['text']['title'],
'cate_id' => $info['text']['cate_id'] ?? '',
'cate_id' => implode(',',$info['text']['cate']) ?? '',
'content'=>$info['text']['content'] ?? '',
'short_description'=>$info['text']['short_description'] ?? '',
'images'=>$info['text']['images'] ?? '',
]);
@file_put_contents(storage_path('logs/lyh_error.log'), var_export($response, true) . PHP_EOL, FILE_APPEND);
if ($response->successful()) {
$result = $response->json(); // 获取 JSON 响应体
@file_put_contents(storage_path('logs/lyh_error.log'), var_export($result, true) . PHP_EOL, FILE_APPEND);
if ($result && $result['status'] == 200) {
return $this->success();
}
... ... @@ -231,7 +233,7 @@ class TicketUploadDataLogic extends BaseLogic
public function save5NewsData($info,$url){
$response = Http::withHeaders([])->asForm()->post($url, [
'title' => $info['text']['title'],
'cate' => $info['text']['cate_id'] ?? '',
'cate' => $info['text']['cate'] ?? '',
'content'=>$info['text']['content'] ?? '',
'images'=>$info['text']['images'] ?? '',
]);
... ...