Selaa lähdekoodia

Merge branch '20250915_jobhunting_fr'

FengR 4 kuukautta sitten
vanhempi
sitoutus
a07a6f1ba3
1 muutettua tiedostoa jossa 4 lisäystä ja 4 poistoa
  1. 4 4
      app/JsonRpc/NewsService.php

+ 4 - 4
app/JsonRpc/NewsService.php

@@ -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'])) {