作者 刘锟

合并分支 'akun' 到 'master'

Akun



查看合并请求 !347
@@ -542,16 +542,6 @@ class ProjectUpdate extends Command @@ -542,16 +542,6 @@ class ProjectUpdate extends Command
542 $data = curl_c($url); 542 $data = curl_c($url);
543 if (isset($data['code']) && $data['code'] == 200) { 543 if (isset($data['code']) && $data['code'] == 200) {
544 $category = $data['data']['category'] ?? []; 544 $category = $data['data']['category'] ?? [];
545 - if (empty($category)) {  
546 - $category = [  
547 - [  
548 - 'id' => 0,  
549 - 'name' => $custom_info['route'],  
550 - 'url' => '/' . $custom_info['route'],  
551 - 'parent' => 0  
552 - ]  
553 - ];  
554 - }  
555 $this->category_custom_insert($project_id, $custom_info['id'], $category, 0); 545 $this->category_custom_insert($project_id, $custom_info['id'], $category, 0);
556 546
557 $count = $data['data']['count'] ?? 0; 547 $count = $data['data']['count'] ?? 0;
@@ -574,11 +564,6 @@ class ProjectUpdate extends Command @@ -574,11 +564,6 @@ class ProjectUpdate extends Command
574 if ($item['category'] ?? []) { 564 if ($item['category'] ?? []) {
575 $category_arr = $category_model->list(['original_id' => ['in', array_column($item['category'], 'id')]]); 565 $category_arr = $category_model->list(['original_id' => ['in', array_column($item['category'], 'id')]]);
576 $category_id = implode(',', array_column($category_arr, 'id')); 566 $category_id = implode(',', array_column($category_arr, 'id'));
577 - } else {  
578 - $category_custom = $category_model->read(['route' => $custom_info['route']], 'id');  
579 - if ($category_custom) {  
580 - $category_id = $category_custom['id'];  
581 - }  
582 } 567 }
583 //名称去掉特殊符号 568 //名称去掉特殊符号
584 $item['title'] = $this->special2str($item['title'] ?? ''); 569 $item['title'] = $this->special2str($item['title'] ?? '');