作者 lyh

修复脚本

@@ -56,16 +56,19 @@ class SendProduct extends Command @@ -56,16 +56,19 @@ class SendProduct extends Command
56 $arr1 = $this->sendProduct(); 56 $arr1 = $this->sendProduct();
57 $arr2 = $this->sendBlog(); 57 $arr2 = $this->sendBlog();
58 $arr3 = $this->sendNews(); 58 $arr3 = $this->sendNews();
59 - $c_url = $domain.'api/update_page/';  
60 - $param = [  
61 - 'project_id' => $v['id'],  
62 - 'type' => 1,  
63 - 'route' => 3,  
64 - 'url' => array_merge((array)$arr1,(array)$arr2,(array)$arr3),  
65 - 'language'=> [],  
66 - 'is_sitemap' => 0  
67 - ];  
68 - http_post($c_url, json_encode($param)); 59 + $url = array_merge((array)$arr1,(array)$arr2,(array)$arr3);
  60 + if(!empty($url)){
  61 + $c_url = $domain.'api/update_page/';
  62 + $param = [
  63 + 'project_id' => $v['id'],
  64 + 'type' => 1,
  65 + 'route' => 3,
  66 + 'url' => $url,
  67 + 'language'=> [],
  68 + 'is_sitemap' => 0
  69 + ];
  70 + http_post($c_url, json_encode($param));
  71 + }
69 //TODO::通知C端生成界面 72 //TODO::通知C端生成界面
70 DB::disconnect('custom_mysql'); 73 DB::disconnect('custom_mysql');
71 } 74 }