|
@@ -331,7 +331,7 @@ class NewsService implements NewsServiceInterface
|
|
|
return $article;
|
|
|
});
|
|
|
if (empty($result)) {
|
|
|
- return Result::success([]);
|
|
|
+ return Result::success();
|
|
|
}
|
|
|
return Result::success($result);
|
|
|
} else {
|
|
@@ -383,8 +383,8 @@ class NewsService implements NewsServiceInterface
|
|
|
$article->pinyin = $pinyin;
|
|
|
return $article;
|
|
|
});
|
|
|
- if (empty($result)) {
|
|
|
- return Result::error("暂无头条新闻", 0);
|
|
|
+ if (empty($result) || count($result) == 0) {
|
|
|
+ return Result::error("暂无头条新闻");
|
|
|
}
|
|
|
return Result::success($result);
|
|
|
} else {
|