|
...
|
...
|
@@ -544,21 +544,15 @@ class ProjectUpdate extends Command |
|
|
|
$url = $api_url . '?' . http_build_query(['w' => $api_type, 'page' => 1, 'pagesize' => 0]);
|
|
|
|
$data = curl_c($url);
|
|
|
|
if (isset($data['code']) && $data['code'] == 200) {
|
|
|
|
$category = $data['data']['category'] ?? [];
|
|
|
|
if (empty($category)) {
|
|
|
|
$route_model = new RouteMap();
|
|
|
|
$route_page = $route_model->read(['source' => 'page', 'route' => $custom_info['route']], 'id');
|
|
|
|
if (!$route_page) {
|
|
|
|
$category = [
|
|
|
|
[
|
|
|
|
'id' => 0,
|
|
|
|
'name' => $custom_info['route'],
|
|
|
|
'url' => '/' . $custom_info['route'],
|
|
|
|
'parent' => 0
|
|
|
|
'parent' => 0,
|
|
|
|
'children' => $data['data']['category'] ?? []
|
|
|
|
]
|
|
|
|
];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
$this->category_custom_insert($project_id, $custom_info['id'], $category, 0);
|
|
|
|
|
|
|
|
$count = $data['data']['count'] ?? 0;
|
...
|
...
|
|