作者 lyh

gxAiblog自动发布

@@ -63,7 +63,12 @@ class lyhDemo extends Command @@ -63,7 +63,12 @@ class lyhDemo extends Command
63 //查看当前是否包含句号。 63 //查看当前是否包含句号。
64 $result = $this->hasAnyPeriod($item['seo_description']); 64 $result = $this->hasAnyPeriod($item['seo_description']);
65 if($result === false){ 65 if($result === false){
66 - $text = $this->trimToLastFullWord($item['seo_description']); 66 + $res = $this->hasPeriod($item['seo_description']);
  67 + if($res === false){
  68 + $text = $this->trimToLastFullWord($item['seo_description']);
  69 + }else{
  70 + $text = substr($item['seo_description'], 0, strrpos($item['seo_description'], ',')).'.';
  71 + }
67 }else{ 72 }else{
68 $arr = explode('.',$item['seo_description']); 73 $arr = explode('.',$item['seo_description']);
69 $text = $arr[0].'.'; 74 $text = $arr[0].'.';
@@ -91,4 +96,7 @@ class lyhDemo extends Command @@ -91,4 +96,7 @@ class lyhDemo extends Command
91 public function hasAnyPeriod($text) { 96 public function hasAnyPeriod($text) {
92 return strpos($text, '.') !== false || mb_strpos($text, '。') !== false; 97 return strpos($text, '.') !== false || mb_strpos($text, '。') !== false;
93 } 98 }
  99 + public function hasPeriod($text) {
  100 + return strpos($text, ',') !== false;
  101 + }
94 } 102 }
@@ -184,11 +184,11 @@ class BaseLogic extends Logic @@ -184,11 +184,11 @@ class BaseLogic extends Logic
184 //自建站服务器直接返回 184 //自建站服务器直接返回
185 return $this->success(); 185 return $this->success();
186 } 186 }
187 - if($serversIpInfo && ($serversIpInfo['servers_id'] != 1)){//TODO::当前项目通知不过 ,跳过自动更新  
188 - exec('curl -k "'.$url.'" > /dev/null 2>&1 &');  
189 - }else{ 187 +// if($serversIpInfo && ($serversIpInfo['servers_id'] != 1)){//TODO::当前项目通知不过 ,跳过自动更新
  188 +// exec('curl -k "'.$url.'" > /dev/null 2>&1 &');
  189 +// }else{
190 shell_exec('curl -k "'.$url.'"'); 190 shell_exec('curl -k "'.$url.'"');
191 - } 191 +// }
192 return $this->success(); 192 return $this->success();
193 } 193 }
194 194