|
@@ -934,7 +934,9 @@ class NewsService implements NewsServiceInterface
|
|
|
'article.introduce',
|
|
|
'article.islink',
|
|
|
'article.linkurl',
|
|
|
- 'article.copyfrom')
|
|
|
+ 'article.copyfrom',
|
|
|
+ DB::raw("'$parent_pinyin' as pinyin") // 添加 pinyin 字段
|
|
|
+ )
|
|
|
->orderBy('updated_at', 'desc')
|
|
|
->limit($parentImgNum)
|
|
|
->get()->all();
|
|
@@ -955,7 +957,8 @@ class NewsService implements NewsServiceInterface
|
|
|
'article.introduce',
|
|
|
'article.islink',
|
|
|
'article.linkurl',
|
|
|
- 'article.copyfrom')
|
|
|
+ 'article.copyfrom',
|
|
|
+ DB::raw("'$parent_pinyin' as pinyin"))
|
|
|
->orderBy('updated_at', 'desc')
|
|
|
->limit($parentTextNum)
|
|
|
->get()->all();
|
|
@@ -980,6 +983,7 @@ class NewsService implements NewsServiceInterface
|
|
|
$childCategoryInfo = WebsiteCategory::where('category_id', $childCatId)->where($website)
|
|
|
->selectRaw("category_id, alias, CONCAT( ?, aLIas_pinyin, '/') as aLIas_pinyin", [$parent_pinyin])
|
|
|
->first();
|
|
|
+ $child_pinyin = $childCategoryInfo->aLIas_pinyin ? $childCategoryInfo->aLIas_pinyin : null;
|
|
|
if(empty($childCategoryInfo)){
|
|
|
$childImgArticles = [];
|
|
|
$childTextArticles = [];
|
|
@@ -1001,7 +1005,8 @@ class NewsService implements NewsServiceInterface
|
|
|
'article.introduce',
|
|
|
'article.islink',
|
|
|
'article.linkurl',
|
|
|
- 'article.copyfrom')
|
|
|
+ 'article.copyfrom',
|
|
|
+ DB::raw("'$child_pinyin' as pinyin"))
|
|
|
->where('imgurl', '!=', '')
|
|
|
->orderBy('updated_at', 'desc')
|
|
|
->limit($childImgNum)
|
|
@@ -1022,7 +1027,8 @@ class NewsService implements NewsServiceInterface
|
|
|
'article.introduce',
|
|
|
'article.islink',
|
|
|
'article.linkurl',
|
|
|
- 'article.copyfrom')
|
|
|
+ 'article.copyfrom',
|
|
|
+ DB::raw("'$child_pinyin' as pinyin"))
|
|
|
->orderBy('updated_at', 'desc')
|
|
|
->limit($childTextNum)
|
|
|
->get()->all();
|