|
...
|
...
|
@@ -383,9 +383,16 @@ class UpdateSeoTdk extends Command |
|
|
|
|
|
|
|
$prefix = $this->getPrefixKeyword($project_id, 'prefix', 1, $title);
|
|
|
|
//in,for,with,to,near,from 这些介词 只拼前缀,不拼后缀
|
|
|
|
$suffix_ban = ['in ', 'for ', 'with ', 'to ', 'near ','from ', 'In ', 'For ', 'With ', 'To ', 'Near ','From '];
|
|
|
|
$is_contains_jieci = false;
|
|
|
|
$words = explode(' ', $title);
|
|
|
|
foreach ($words as $word){
|
|
|
|
$word = Str::replace([',', '!', '?'], '', $word);
|
|
|
|
if(in_array(strtolower($word), ['in', 'for', 'with', 'to', 'near','from'])){
|
|
|
|
$is_contains_jieci = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
$suffix = '';
|
|
|
|
if(!Str::contains($title, $suffix_ban)){
|
|
|
|
if(!$is_contains_jieci){
|
|
|
|
// 某些后缀不能并存的情况
|
|
|
|
$ban_suffix = [];
|
|
|
|
//services/service 结尾的词,后缀不拼manufacturer,factory
|
...
|
...
|
|