|
|
@@ -5219,7 +5219,7 @@ class NewsService implements NewsServiceInterface
|
|
|
$segList1 = array_slice($segList, 0, 8);
|
|
|
$data['keyword'] = implode(',', $segList1);
|
|
|
}
|
|
|
- if(!isset($data['eso_description']) || empty($data['eso_description'])){
|
|
|
+ if (!isset($data['seo_description']) || empty($data['seo_description'])) {
|
|
|
$content = $data['description'];
|
|
|
// 去除 <style> 和 <script> 标签及其内容
|
|
|
$content = preg_replace('/<(style|script)[^>]*>.*?<\/\1>/is', '', $content);
|
|
|
@@ -5232,7 +5232,7 @@ class NewsService implements NewsServiceInterface
|
|
|
// 去除多余空白
|
|
|
$content = preg_replace('/\s+/u', '', $content);
|
|
|
// 截取 100 个字符
|
|
|
- $data['eso_descriprion'] = mb_substr($content, 0, 100);
|
|
|
+ $data['seo_description'] = mb_substr($content, 0, 100);
|
|
|
}
|
|
|
|
|
|
// return Result::success($user);
|
|
|
@@ -5403,7 +5403,7 @@ class NewsService implements NewsServiceInterface
|
|
|
$segList1 = array_slice($segList, 0, 8);
|
|
|
$data['keyword'] = implode(',', $segList1);
|
|
|
}
|
|
|
- if(!isset($data['eso_description']) || empty($data['eso_description'])){
|
|
|
+ if(!isset($data['seo_description']) || empty($data['seo_description'])){
|
|
|
$content = $data['description'];
|
|
|
// 去除 <style> 和 <script> 标签及其内容
|
|
|
$content = preg_replace('/<(style|script)[^>]*>.*?<\/\1>/is', '', $content);
|
|
|
@@ -5416,7 +5416,7 @@ class NewsService implements NewsServiceInterface
|
|
|
// 去除多余空白
|
|
|
$content = preg_replace('/\s+/u', '', $content);
|
|
|
// 截取 100 个字符
|
|
|
- $data['eso_descriprion'] = mb_substr($content, 0, 100);
|
|
|
+ $data['seo_description'] = mb_substr($content, 0, 100);
|
|
|
}
|
|
|
$data['cat_arr_id'] = array_values(array_unique($data['cat_arr_id']));
|
|
|
if (isset($data['cat_arr_id']) && !empty($data['cat_arr_id']) && is_array($data['cat_arr_id'])) {
|