正在显示
1 个修改的文件
包含
2 行增加
和
2 行删除
| @@ -102,8 +102,8 @@ class Project5CateController extends BaseController | @@ -102,8 +102,8 @@ class Project5CateController extends BaseController | ||
| 102 | $this->response('未知请求',Code::SYSTEM_ERROR); | 102 | $this->response('未知请求',Code::SYSTEM_ERROR); |
| 103 | } | 103 | } |
| 104 | $response = Http::withHeaders([])->asForm()->post($url, [ | 104 | $response = Http::withHeaders([])->asForm()->post($url, [ |
| 105 | - 'name' => '测试分类', | ||
| 106 | - 'parent' => 0 | 105 | + 'name' => $this->param['name'], |
| 106 | + 'parent' => $this->param['parent'] ?? 0, | ||
| 107 | ]); | 107 | ]); |
| 108 | if ($response->successful()) { | 108 | if ($response->successful()) { |
| 109 | $result = $response->json(); // 获取 JSON 响应体 | 109 | $result = $response->json(); // 获取 JSON 响应体 |
-
请 注册 或 登录 后发表评论