作者 zhl

特殊处理聚合页seo标题

@@ -333,13 +333,13 @@ class UpdateSeoTdk extends Command @@ -333,13 +333,13 @@ class UpdateSeoTdk extends Command
333 $data[$field] = $this->ai_send($prompt, $project_id, $table, $v['id']); 333 $data[$field] = $this->ai_send($prompt, $project_id, $table, $v['id']);
334 } 334 }
335 } 335 }
336 - else if ($table == 'gl_product_keyword' && $field == 'tags_title') { 336 + else if ($table == 'gl_product_keyword' && $field == 'seo_title') {
337 # TODO 聚合页seo title 特殊处理 前缀_1 . 关键词 . 后缀_2 337 # TODO 聚合页seo title 特殊处理 前缀_1 . 关键词 . 后缀_2
338 $prefix = $this->getPrefixKeyword($project_id, 'prefix', 1); 338 $prefix = $this->getPrefixKeyword($project_id, 'prefix', 1);
339 $suffix = $this->getPrefixKeyword($project_id, 'suffix', 2); 339 $suffix = $this->getPrefixKeyword($project_id, 'suffix', 2);
340 if (empty($prefix) || empty($suffix)) 340 if (empty($prefix) || empty($suffix))
341 continue; 341 continue;
342 - $seo_title = $prefix . $v[$this->topic_fields[$table]] . $suffix; 342 + $seo_title = $prefix . ' ' . $v[$this->topic_fields[$table]] . ' ' . $suffix;
343 $data[$field] = $seo_title; 343 $data[$field] = $seo_title;
344 $update[$table]['title']++; 344 $update[$table]['title']++;
345 } else { 345 } else {