合并分支 'akun' 到 'master'
Akun 查看合并请求 !356
正在显示
1 个修改的文件
包含
9 行增加
和
15 行删除
| @@ -544,21 +544,15 @@ class ProjectUpdate extends Command | @@ -544,21 +544,15 @@ class ProjectUpdate extends Command | ||
| 544 | $url = $api_url . '?' . http_build_query(['w' => $api_type, 'page' => 1, 'pagesize' => 0]); | 544 | $url = $api_url . '?' . http_build_query(['w' => $api_type, 'page' => 1, 'pagesize' => 0]); |
| 545 | $data = curl_c($url); | 545 | $data = curl_c($url); |
| 546 | if (isset($data['code']) && $data['code'] == 200) { | 546 | if (isset($data['code']) && $data['code'] == 200) { |
| 547 | - $category = $data['data']['category'] ?? []; | ||
| 548 | - if (empty($category)) { | ||
| 549 | - $route_model = new RouteMap(); | ||
| 550 | - $route_page = $route_model->read(['source' => 'page', 'route' => $custom_info['route']], 'id'); | ||
| 551 | - if (!$route_page) { | ||
| 552 | - $category = [ | ||
| 553 | - [ | ||
| 554 | - 'id' => 0, | ||
| 555 | - 'name' => $custom_info['route'], | ||
| 556 | - 'url' => '/' . $custom_info['route'], | ||
| 557 | - 'parent' => 0 | ||
| 558 | - ] | ||
| 559 | - ]; | ||
| 560 | - } | ||
| 561 | - } | 547 | + $category = [ |
| 548 | + [ | ||
| 549 | + 'id' => 0, | ||
| 550 | + 'name' => $custom_info['route'], | ||
| 551 | + 'url' => '/' . $custom_info['route'], | ||
| 552 | + 'parent' => 0, | ||
| 553 | + 'children' => $data['data']['category'] ?? [] | ||
| 554 | + ] | ||
| 555 | + ]; | ||
| 562 | $this->category_custom_insert($project_id, $custom_info['id'], $category, 0); | 556 | $this->category_custom_insert($project_id, $custom_info['id'], $category, 0); |
| 563 | 557 | ||
| 564 | $count = $data['data']['count'] ?? 0; | 558 | $count = $data['data']['count'] ?? 0; |
-
请 注册 或 登录 后发表评论