作者 刘锟

合并分支 'akun' 到 'master'

Akun



查看合并请求 !404
@@ -562,15 +562,18 @@ class ProjectUpdate extends Command @@ -562,15 +562,18 @@ class ProjectUpdate extends Command
562 $url = $api_url . '?' . http_build_query(['w' => $api_type, 'page' => 1, 'pagesize' => 0]); 562 $url = $api_url . '?' . http_build_query(['w' => $api_type, 'page' => 1, 'pagesize' => 0]);
563 $data = curl_c($url); 563 $data = curl_c($url);
564 if (isset($data['code']) && $data['code'] == 200) { 564 if (isset($data['code']) && $data['code'] == 200) {
  565 + if(isset($data['data']['category']) && $data['data']['category']){
  566 + $category = $data['data']['category'];
  567 + }else{
565 $category = [ 568 $category = [
566 [ 569 [
567 'id' => 0, 570 'id' => 0,
568 'name' => $custom_info['route'], 571 'name' => $custom_info['route'],
569 'url' => '/' . $custom_info['route'], 572 'url' => '/' . $custom_info['route'],
570 - 'parent' => 0,  
571 - 'children' => $data['data']['category'] ?? [] 573 + 'parent' => 0
572 ] 574 ]
573 ]; 575 ];
  576 + }
574 $this->category_custom_insert($project_id, $custom_info['id'], $category, 0); 577 $this->category_custom_insert($project_id, $custom_info['id'], $category, 0);
575 578
576 $count = $data['data']['count'] ?? 0; 579 $count = $data['data']['count'] ?? 0;