|
@@ -256,11 +256,12 @@ class NewsService implements NewsServiceInterface
|
|
|
return Result::error("查询失败",0);
|
|
|
}
|
|
|
}
|
|
|
- /**
|
|
|
+ /**
|
|
|
+ * 获取新闻
|
|
|
* @param array $data
|
|
|
* @return array
|
|
|
- */
|
|
|
- public function getWebsiteArticlett(array $data): array // 获取新闻
|
|
|
+ */
|
|
|
+ public function getWebsiteArticlett(array $data): array
|
|
|
{
|
|
|
|
|
|
$category = WebsiteCategory::where('website_id',$data['website_id'])->select('category_id')->get();
|
|
@@ -281,13 +282,16 @@ class NewsService implements NewsServiceInterface
|
|
|
return Result::error("暂无头条新闻",0);
|
|
|
}
|
|
|
return Result::success($result);
|
|
|
+ }else{
|
|
|
+ return Result::error("本网站下暂无相关栏目",0);
|
|
|
}
|
|
|
}
|
|
|
- /**
|
|
|
+ /**
|
|
|
+ * 获取模块新闻
|
|
|
* @param array $data
|
|
|
* @return array
|
|
|
- */
|
|
|
- // 获取模块新闻
|
|
|
+ */
|
|
|
+
|
|
|
public function getWebsiteModelArticles(array $data): array
|
|
|
{
|
|
|
$catid=$data['catid'];
|