|
|
@@ -613,7 +613,7 @@ class NewsService implements NewsServiceInterface
|
|
|
// 采集来的文章,content中可能包含div标签,需要先移除
|
|
|
$pattern = '/<\/?div\b(?:[^"\'>]|"[^"]*"|\'[^\']*\')*>/is';
|
|
|
$article_data = preg_replace($pattern, '', $data['content']);
|
|
|
- $$articleDataContent['content'] = ArticleData::where('article_id', $data['id'])->update(['content' => $article_data]);
|
|
|
+ $$articleDataContent['content'] = $article_data;
|
|
|
}
|
|
|
|
|
|
$contentInsertId = ArticleData::insertGetId($articleDataContent);
|
|
|
@@ -980,9 +980,13 @@ class NewsService implements NewsServiceInterface
|
|
|
]);
|
|
|
}
|
|
|
$id = Article::where(['id' => $data['id']])->update($articleData);
|
|
|
- $articleDataContent = [
|
|
|
- 'content' => $data['content'],
|
|
|
- ];
|
|
|
+ // $articleDataContent = [
|
|
|
+ // 'content' => $data['content'],
|
|
|
+ // ];
|
|
|
+ // 采集来的文章,content中可能包含div标签,需要先移除
|
|
|
+ $pattern = '/<\/?div\b(?:[^"\'>]|"[^"]*"|\'[^\']*\')*>/is';
|
|
|
+ $article_data = preg_replace($pattern, '', $data['content']);
|
|
|
+ $articleDataContent['content'] = $article_data;
|
|
|
ArticleData::where(['article_id' => $data['id']])->update($articleDataContent);
|
|
|
//处理投票
|
|
|
$id = $data['id'];
|