Merge branch 'master' of http://47.244.231.31:8099/zhl/globalso-v6
正在显示
1 个修改的文件
包含
2 行增加
和
8 行删除
| @@ -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 = [ | 547 | $category = [ |
| 553 | [ | 548 | [ |
| 554 | 'id' => 0, | 549 | 'id' => 0, |
| 555 | 'name' => $custom_info['route'], | 550 | 'name' => $custom_info['route'], |
| 556 | 'url' => '/' . $custom_info['route'], | 551 | 'url' => '/' . $custom_info['route'], |
| 557 | - 'parent' => 0 | 552 | + 'parent' => 0, |
| 553 | + 'children' => $data['data']['category'] ?? [] | ||
| 558 | ] | 554 | ] |
| 559 | ]; | 555 | ]; |
| 560 | - } | ||
| 561 | - } | ||
| 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; |
-
请 注册 或 登录 后发表评论