正在显示
1 个修改的文件
包含
5 行增加
和
3 行删除
| @@ -176,7 +176,7 @@ class TicketUploadDataLogic extends BaseLogic | @@ -176,7 +176,7 @@ class TicketUploadDataLogic extends BaseLogic | ||
| 176 | }else{ | 176 | }else{ |
| 177 | if($this->param['status'] == $this->model::STATUS_SUCCESS){ | 177 | if($this->param['status'] == $this->model::STATUS_SUCCESS){ |
| 178 | $ticketProjectMdoel = new TicketProject(); | 178 | $ticketProjectMdoel = new TicketProject(); |
| 179 | - $projectInfo = $ticketProjectMdoel->read(['post_id' => $info['post_id']]); | 179 | + $projectInfo = $ticketProjectMdoel->read(['post_id' => $info['project_id']]); |
| 180 | if($projectInfo === false){ | 180 | if($projectInfo === false){ |
| 181 | $this->fail('当前项目不存在或数据未同步'); | 181 | $this->fail('当前项目不存在或数据未同步'); |
| 182 | } | 182 | } |
| @@ -207,13 +207,15 @@ class TicketUploadDataLogic extends BaseLogic | @@ -207,13 +207,15 @@ class TicketUploadDataLogic extends BaseLogic | ||
| 207 | public function save5ProductData($info,$url){ | 207 | public function save5ProductData($info,$url){ |
| 208 | $response = Http::withHeaders([])->asForm()->post($url, [ | 208 | $response = Http::withHeaders([])->asForm()->post($url, [ |
| 209 | 'title' => $info['text']['title'], | 209 | 'title' => $info['text']['title'], |
| 210 | - 'cate_id' => $info['text']['cate_id'] ?? '', | 210 | + 'cate_id' => implode(',',$info['text']['cate']) ?? '', |
| 211 | 'content'=>$info['text']['content'] ?? '', | 211 | 'content'=>$info['text']['content'] ?? '', |
| 212 | 'short_description'=>$info['text']['short_description'] ?? '', | 212 | 'short_description'=>$info['text']['short_description'] ?? '', |
| 213 | 'images'=>$info['text']['images'] ?? '', | 213 | 'images'=>$info['text']['images'] ?? '', |
| 214 | ]); | 214 | ]); |
| 215 | + @file_put_contents(storage_path('logs/lyh_error.log'), var_export($response, true) . PHP_EOL, FILE_APPEND); | ||
| 215 | if ($response->successful()) { | 216 | if ($response->successful()) { |
| 216 | $result = $response->json(); // 获取 JSON 响应体 | 217 | $result = $response->json(); // 获取 JSON 响应体 |
| 218 | + @file_put_contents(storage_path('logs/lyh_error.log'), var_export($result, true) . PHP_EOL, FILE_APPEND); | ||
| 217 | if ($result && $result['status'] == 200) { | 219 | if ($result && $result['status'] == 200) { |
| 218 | return $this->success(); | 220 | return $this->success(); |
| 219 | } | 221 | } |
| @@ -231,7 +233,7 @@ class TicketUploadDataLogic extends BaseLogic | @@ -231,7 +233,7 @@ class TicketUploadDataLogic extends BaseLogic | ||
| 231 | public function save5NewsData($info,$url){ | 233 | public function save5NewsData($info,$url){ |
| 232 | $response = Http::withHeaders([])->asForm()->post($url, [ | 234 | $response = Http::withHeaders([])->asForm()->post($url, [ |
| 233 | 'title' => $info['text']['title'], | 235 | 'title' => $info['text']['title'], |
| 234 | - 'cate' => $info['text']['cate_id'] ?? '', | 236 | + 'cate' => $info['text']['cate'] ?? '', |
| 235 | 'content'=>$info['text']['content'] ?? '', | 237 | 'content'=>$info['text']['content'] ?? '', |
| 236 | 'images'=>$info['text']['images'] ?? '', | 238 | 'images'=>$info['text']['images'] ?? '', |
| 237 | ]); | 239 | ]); |
-
请 注册 或 登录 后发表评论