|
@@ -21,41 +21,62 @@ class NewsService implements NewsServiceInterface
|
|
|
public function getCategoryList(array $data): array
|
|
|
{
|
|
|
$where = [];
|
|
|
- if(isset($data['name']) && $data['name']){
|
|
|
- array_push($where, ['category.name','like','%'.$data['name'].'%']);
|
|
|
+ if (isset($data['name']) && $data['name']) {
|
|
|
+ array_push($where, ['category.name', 'like', '%' . $data['name'] . '%']);
|
|
|
}
|
|
|
- if(isset($data['department_id']) && $data['department_id']){
|
|
|
- array_push($where, ['category.department_id','=',$data['department_id']]);
|
|
|
+ if (isset($data['department_id']) && $data['department_id']) {
|
|
|
+ array_push($where, ['category.department_id', '=', $data['department_id']]);
|
|
|
}
|
|
|
- $city_id='';
|
|
|
- if(isset($data['city_id']) && $data['city_id']){
|
|
|
+ $city_id = '';
|
|
|
+ if (isset($data['city_id']) && $data['city_id']) {
|
|
|
$city_id = intval($data['city_id']);
|
|
|
}
|
|
|
$rep = Category::where($where)
|
|
|
->when($city_id, function ($query) use ($city_id) {
|
|
|
- if(isset($city_id) && $city_id) {
|
|
|
+ if (isset($city_id) && $city_id) {
|
|
|
$query->whereJsonContains("category.city_arr_id", $city_id);
|
|
|
}
|
|
|
})
|
|
|
- ->leftJoin('district','category.city_id','district.id')
|
|
|
- ->leftJoin('department','category.department_id','department.id')
|
|
|
- ->select("category.*","district.name as city_name","department.name as department_name")
|
|
|
- ->limit($data['pageSize'])->orderByDesc('category.updated_at')->offset(($data['page']-1)*$data['pageSize'])->get();
|
|
|
- $count = Category::where($where)->when($city_id, function ($query) use ($city_id) {
|
|
|
- if(isset($city_id) && $city_id) {
|
|
|
+ ->leftJoin('district', 'category.city_id', 'district.id')
|
|
|
+ ->leftJoin('department', 'category.department_id', 'department.id')
|
|
|
+ ->select("category.*", "district.name as city_name", "department.name as department_name")
|
|
|
+ ->limit($data['pageSize'])->orderByDesc('category.updated_at')->offset(($data['page'] - 1) * $data['pageSize'])->get();
|
|
|
+ $count = Category::where($where)->when($city_id, function ($query) use ($city_id) {
|
|
|
+ if (isset($city_id) && $city_id) {
|
|
|
$query->whereJsonContains("category.city_arr_id", $city_id);
|
|
|
}
|
|
|
})->count();
|
|
|
$data = [
|
|
|
- 'rows'=>$rep->toArray(),
|
|
|
- 'count'=>$count
|
|
|
+ 'rows' => $rep->toArray(),
|
|
|
+ 'count' => $count,
|
|
|
];
|
|
|
- if(empty($rep->toArray())){
|
|
|
+ if (empty($rep->toArray())) {
|
|
|
return Result::error("没有导航池数据");
|
|
|
}
|
|
|
return Result::success($data);
|
|
|
}
|
|
|
-
|
|
|
+ public function myCategoryList(array $data): array
|
|
|
+ {
|
|
|
+ $sszq = $data['sszq'] ?? '';
|
|
|
+ unset($data['sszq']);
|
|
|
+ //1,2,3 根据这些webid,。从website_category表中取出对应的分类id,然后从category表中取出分类信息
|
|
|
+ $catorytids = WebsiteCategory::whereIn('website_id', explode(',', $sszq))->get()->pluck('category_id')->toArray();
|
|
|
+ $where[] = [
|
|
|
+ 'pid', '=', $data['pid'],
|
|
|
+ ];
|
|
|
+ if (isset($data['name'])) {
|
|
|
+ array_push($where, ['category.name', 'like', '%' . $data['name'] . '%']);
|
|
|
+ }
|
|
|
+ var_dump($where);
|
|
|
+ //根据分类id,从category表中取出分类信息
|
|
|
+ $result = Category::where($where)
|
|
|
+ ->whereIn('category.id', $catorytids)
|
|
|
+ ->select('category.*', 'category.id as category_id')->get();
|
|
|
+ if (empty($result)) {
|
|
|
+ return Result::error("没有栏目数据");
|
|
|
+ }
|
|
|
+ return Result::success($result);
|
|
|
+ }
|
|
|
/**
|
|
|
* @param array $data
|
|
|
* @return array
|
|
@@ -63,14 +84,14 @@ class NewsService implements NewsServiceInterface
|
|
|
public function categoryList(array $data): array
|
|
|
{
|
|
|
$where[] = [
|
|
|
- 'pid','=',$data['pid']
|
|
|
+ 'pid', '=', $data['pid'],
|
|
|
];
|
|
|
- if(isset($data['name'])){
|
|
|
- array_push($where, ['category.name','like','%'.$data['name'].'%']);
|
|
|
+ if (isset($data['name'])) {
|
|
|
+ array_push($where, ['category.name', 'like', '%' . $data['name'] . '%']);
|
|
|
}
|
|
|
var_dump($where);
|
|
|
- $result = Category::where($where)->select('category.*','category.id as category_id')->get();
|
|
|
- if(empty($result)){
|
|
|
+ $result = Category::where($where)->select('category.*', 'category.id as category_id')->get();
|
|
|
+ if (empty($result)) {
|
|
|
return Result::error("没有栏目数据");
|
|
|
}
|
|
|
return Result::success($result);
|
|
@@ -82,10 +103,10 @@ class NewsService implements NewsServiceInterface
|
|
|
public function addCategory(array $data): array
|
|
|
{
|
|
|
$id = Category::insertGetId($data);
|
|
|
- if(empty($id)){
|
|
|
+ if (empty($id)) {
|
|
|
return Result::error("添加失败");
|
|
|
}
|
|
|
- return Result::success(['id'=>$id]);
|
|
|
+ return Result::success(['id' => $id]);
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -94,18 +115,18 @@ class NewsService implements NewsServiceInterface
|
|
|
*/
|
|
|
public function delCategory(array $data): array
|
|
|
{
|
|
|
- $categoryList = Category::where(['pid'=>$data['id']])->get();
|
|
|
- var_dump("分类列表:",$data,$categoryList);
|
|
|
- if($categoryList->toArray()){
|
|
|
+ $categoryList = Category::where(['pid' => $data['id']])->get();
|
|
|
+ var_dump("分类列表:", $data, $categoryList);
|
|
|
+ if ($categoryList->toArray()) {
|
|
|
return Result::error("分类下面有子分类不能删除");
|
|
|
}
|
|
|
- $articleList = Article::where(['catid'=>$data['id']])->get();
|
|
|
- var_dump("文章列表:",$articleList);
|
|
|
- if($articleList->toArray()){
|
|
|
+ $articleList = Article::where(['catid' => $data['id']])->get();
|
|
|
+ var_dump("文章列表:", $articleList);
|
|
|
+ if ($articleList->toArray()) {
|
|
|
return Result::error("分类下面有资讯不能删除");
|
|
|
}
|
|
|
$result = Category::where($data)->delete();
|
|
|
- if(!$result){
|
|
|
+ if (!$result) {
|
|
|
return Result::error("删除失败");
|
|
|
}
|
|
|
return Result::success($result);
|
|
@@ -118,12 +139,12 @@ class NewsService implements NewsServiceInterface
|
|
|
public function updateCategory(array $data): array
|
|
|
{
|
|
|
$where = [
|
|
|
- 'id'=>$data['id']
|
|
|
+ 'id' => $data['id'],
|
|
|
];
|
|
|
$result = Category::where($where)->update($data);
|
|
|
- if($result){
|
|
|
+ if ($result) {
|
|
|
return Result::success($result);
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
return Result::error("更新失败");
|
|
|
}
|
|
|
}
|
|
@@ -136,12 +157,12 @@ class NewsService implements NewsServiceInterface
|
|
|
public function getCategoryInfo(array $data): array
|
|
|
{
|
|
|
$where = [
|
|
|
- 'id'=>$data['id']
|
|
|
+ 'id' => $data['id'],
|
|
|
];
|
|
|
$result = Category::where($where)->first();
|
|
|
- if($result){
|
|
|
+ if ($result) {
|
|
|
return Result::success($result);
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
return Result::error("更新失败");
|
|
|
}
|
|
|
}
|
|
@@ -151,38 +172,48 @@ class NewsService implements NewsServiceInterface
|
|
|
*/
|
|
|
public function getArticleList(array $data): array
|
|
|
{
|
|
|
- $where= [];
|
|
|
+ //判断是否是管理员'1:个人会员 2:政务会员 3:企业会员 4:调研员 10000:管理员 20000:游客(小程序)'
|
|
|
+ $type_id = $data['type_id'];
|
|
|
+ unset($data['type_id']);
|
|
|
+ $user_id = $data['user_id'];
|
|
|
+ unset($data['user_id']);
|
|
|
|
|
|
- if(isset($data['title']) && $data['title']){
|
|
|
- array_push($where,['article.title','like','%'.$data['title'].'%']);
|
|
|
+ $where = [];
|
|
|
+
|
|
|
+ if (isset($data['title']) && $data['title']) {
|
|
|
+ array_push($where, ['article.title', 'like', '%' . $data['title'] . '%']);
|
|
|
+ }
|
|
|
+ if (isset($data['category_name']) && $data['category_name']) {
|
|
|
+ array_push($where, ['category.name', 'like', '%' . $data['category_name'] . '%']);
|
|
|
}
|
|
|
- if(isset($data['category_name']) && $data['category_name']){
|
|
|
- array_push($where,['category.name','like','%'.$data['category_name'].'%']);
|
|
|
+ if (isset($data['author']) && $data['author']) {
|
|
|
+ array_push($where, ['article.author', '=', $data['author']]);
|
|
|
}
|
|
|
- if(isset($data['author']) && $data['author']){
|
|
|
- array_push($where,['article.author','=',$data['author']]);
|
|
|
+ if (isset($data['islink']) && $data['islink'] !== "") {
|
|
|
+ array_push($where, ['article.islink', '=', $data['islink']]);
|
|
|
}
|
|
|
- if(isset($data['islink']) && $data['islink']!==""){
|
|
|
- array_push($where,['article.islink','=',$data['islink']]);
|
|
|
+ if (isset($data['status']) && $data['status'] !== "") {
|
|
|
+ array_push($where, ['article.status', '=', $data['status']]);
|
|
|
}
|
|
|
- if(isset($data['status']) && $data['status']!==""){
|
|
|
- array_push($where,['article.status','=',$data['status']]);
|
|
|
+ //不是管理员展示个人数据;
|
|
|
+ if ($type_id != 10000) {
|
|
|
+ $where[] = ['article.admin_user_id', '=', $user_id];
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
$rep = Article::where($where)
|
|
|
- ->whereNotIn('article.status',[404])
|
|
|
- ->leftJoin('category','article.catid','category.id')
|
|
|
- ->select("article.*","category.name as category_name")
|
|
|
- ->orderBy("article.id","desc")
|
|
|
+ ->whereNotIn('article.status', [404])
|
|
|
+ ->leftJoin('category', 'article.catid', 'category.id')
|
|
|
+ ->select("article.*", "category.name as category_name")
|
|
|
+ ->orderBy("article.id", "desc")
|
|
|
->limit($data['pageSize'])
|
|
|
- ->offset(($data['page']-1)*$data['pageSize'])->get();
|
|
|
- $count = Article::where($where)->whereNotIn('article.status',[404])
|
|
|
- ->leftJoin('category','article.catid','category.id')->count();
|
|
|
+ ->offset(($data['page'] - 1) * $data['pageSize'])->get();
|
|
|
+ $count = Article::where($where)->whereNotIn('article.status', [404])
|
|
|
+ ->leftJoin('category', 'article.catid', 'category.id')->count();
|
|
|
$data = [
|
|
|
- 'rows'=>$rep->toArray(),
|
|
|
- 'count'=>$count
|
|
|
+ 'rows' => $rep->toArray(),
|
|
|
+ 'count' => $count,
|
|
|
];
|
|
|
- if(empty($rep)){
|
|
|
+ if (empty($rep)) {
|
|
|
return Result::error("没有信息数据");
|
|
|
}
|
|
|
return Result::success($data);
|
|
@@ -195,24 +226,24 @@ class NewsService implements NewsServiceInterface
|
|
|
public function addArticle(array $data): array
|
|
|
{
|
|
|
Db::beginTransaction();
|
|
|
- try{
|
|
|
+ try {
|
|
|
|
|
|
$articleData = $data;
|
|
|
unset($articleData['content']);
|
|
|
$id = Article::insertGetId($articleData);
|
|
|
$articleDataContent = [
|
|
|
- 'article_id'=>$id,
|
|
|
- 'content'=>$data['content']
|
|
|
+ 'article_id' => $id,
|
|
|
+ 'content' => $data['content'],
|
|
|
];
|
|
|
ArticleData::insertGetId($articleDataContent);
|
|
|
Db::commit();
|
|
|
- } catch(\Throwable $ex){
|
|
|
+ } catch (\Throwable $ex) {
|
|
|
Db::rollBack();
|
|
|
var_dump($ex->getMessage());
|
|
|
- return Result::error("创建失败",0);
|
|
|
+ return Result::error("创建失败", 0);
|
|
|
}
|
|
|
|
|
|
- return Result::success(['id'=>$id]);
|
|
|
+ return Result::success(['id' => $id]);
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -222,7 +253,7 @@ class NewsService implements NewsServiceInterface
|
|
|
public function delArticle(array $data): array
|
|
|
{
|
|
|
$result = Article::where($data)->delete();
|
|
|
- if(!$result){
|
|
|
+ if (!$result) {
|
|
|
return Result::error("删除失败");
|
|
|
}
|
|
|
return Result::success($result);
|
|
@@ -235,9 +266,9 @@ class NewsService implements NewsServiceInterface
|
|
|
public function updateArticle(array $data): array
|
|
|
{
|
|
|
Db::beginTransaction();
|
|
|
- try{
|
|
|
- $data['cat_arr_id'] = isset($data['cat_arr_id'])?json_encode($data['cat_arr_id']):'';
|
|
|
- $data['tag'] = isset($data['tag'])?json_encode($data['tag']):'';
|
|
|
+ try {
|
|
|
+ $data['cat_arr_id'] = isset($data['cat_arr_id']) ? json_encode($data['cat_arr_id']) : '';
|
|
|
+ $data['tag'] = isset($data['tag']) ? json_encode($data['tag']) : '';
|
|
|
$articleData = $data;
|
|
|
unset($articleData['content']);
|
|
|
unset($articleData['status_name']);
|
|
@@ -245,15 +276,15 @@ class NewsService implements NewsServiceInterface
|
|
|
unset($articleData['content']);
|
|
|
unset($articleData['pid_arr']);
|
|
|
unset($articleData['pid']);
|
|
|
- $id = Article::where(['id'=>$data['id']])->update($articleData);
|
|
|
+ $id = Article::where(['id' => $data['id']])->update($articleData);
|
|
|
$articleDataContent = [
|
|
|
- 'content'=>$data['content']
|
|
|
+ 'content' => $data['content'],
|
|
|
];
|
|
|
- ArticleData::where(['article_id'=>$data['id']])->update($articleDataContent);
|
|
|
- } catch(\Throwable $ex){
|
|
|
+ ArticleData::where(['article_id' => $data['id']])->update($articleDataContent);
|
|
|
+ } catch (\Throwable $ex) {
|
|
|
Db::rollBack();
|
|
|
var_dump($ex->getMessage());
|
|
|
- return Result::error("更新失败",0);
|
|
|
+ return Result::error("更新失败", 0);
|
|
|
}
|
|
|
return Result::success([]);
|
|
|
|
|
@@ -264,13 +295,13 @@ class NewsService implements NewsServiceInterface
|
|
|
* @param array $data
|
|
|
* @return array
|
|
|
*/
|
|
|
- public function upArticleStatus(array $data):array
|
|
|
+ public function upArticleStatus(array $data): array
|
|
|
{
|
|
|
- $result = Article::where(['id'=>$data['id']])->update($data);
|
|
|
- if($result){
|
|
|
+ $result = Article::where(['id' => $data['id']])->update($data);
|
|
|
+ if ($result) {
|
|
|
return Result::success();
|
|
|
- }else{
|
|
|
- return Result::error("更新状态失败",0);
|
|
|
+ } else {
|
|
|
+ return Result::error("更新状态失败", 0);
|
|
|
}
|
|
|
}
|
|
|
/**
|
|
@@ -280,103 +311,103 @@ class NewsService implements NewsServiceInterface
|
|
|
public function getArticleInfo(array $data): array
|
|
|
{
|
|
|
$where = [
|
|
|
- 'article.id'=>$data['id']
|
|
|
+ 'article.id' => $data['id'],
|
|
|
];
|
|
|
- $result = Article::where($where)->leftJoin("article_data","article.id","article_data.article_id")->first();
|
|
|
- if($result){
|
|
|
+ $result = Article::where($where)->leftJoin("article_data", "article.id", "article_data.article_id")->first();
|
|
|
+ if ($result) {
|
|
|
return Result::success($result->toArray());
|
|
|
- }else{
|
|
|
- return Result::error("查询失败",0);
|
|
|
+ } else {
|
|
|
+ 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();
|
|
|
- $category = $category->toArray();
|
|
|
- $result= [];
|
|
|
- if($category){
|
|
|
+
|
|
|
+ $category = WebsiteCategory::where('website_id', $data['website_id'])->select('category_id')->get();
|
|
|
+ $category = $category->toArray();
|
|
|
+ $result = [];
|
|
|
+ if ($category) {
|
|
|
$category_ids = [];
|
|
|
- foreach($category as $val){
|
|
|
- array_push($category_ids,$val['category_id']);
|
|
|
+ foreach ($category as $val) {
|
|
|
+ array_push($category_ids, $val['category_id']);
|
|
|
+ }
|
|
|
+ if (isset($data['placeid'])) {
|
|
|
+ $placeid = $data['placeid'] - 1;
|
|
|
+ $result = Article::where('status', 1)->where('level', $data['level'])->whereIn("catid", $category_ids)->orderBy("created_at", "desc")->offset($placeid)->limit($data['pageSize'])->get();
|
|
|
+ } else {
|
|
|
+ $result = Article::where('status', 1)->where('level', $data['level'])->whereIn("catid", $category_ids)->orderBy("created_at", "desc")->offset(0)->limit($data['pageSize'])->get();
|
|
|
}
|
|
|
- if(isset($data['placeid'])){
|
|
|
- $placeid=$data['placeid']-1;
|
|
|
- $result=Article::where('status',1)->where('level',$data['level'])->whereIn("catid",$category_ids)->orderBy("created_at","desc")->offset($placeid)->limit($data['pageSize'])->get();
|
|
|
- }else{
|
|
|
- $result=Article::where('status',1)->where('level',$data['level'])->whereIn("catid",$category_ids)->orderBy("created_at","desc")->offset(0)->limit($data['pageSize'])->get();
|
|
|
+ if (empty($result)) {
|
|
|
+ return Result::error("暂无头条新闻", 0);
|
|
|
}
|
|
|
- if(empty($result)){
|
|
|
- return Result::error("暂无头条新闻",0);
|
|
|
- }
|
|
|
- return Result::success($result);
|
|
|
- }else{
|
|
|
- return Result::error("本网站下暂无相关栏目",0);
|
|
|
+ return Result::success($result);
|
|
|
+ } else {
|
|
|
+ return Result::error("本网站下暂无相关栏目", 0);
|
|
|
}
|
|
|
}
|
|
|
/**
|
|
|
* 获取模块新闻
|
|
|
* @param array $data
|
|
|
* @return array
|
|
|
- */
|
|
|
-
|
|
|
- public function getWebsiteModelArticles(array $data): array
|
|
|
+ */
|
|
|
+
|
|
|
+ public function getWebsiteModelArticles(array $data): array
|
|
|
{
|
|
|
- $catid=$data['catid'];
|
|
|
- $category = WebsiteCategory::where('website_id',$data['website_id'])->where('category_id',$catid)->select('category_id')->get();
|
|
|
+ $catid = $data['catid'];
|
|
|
+ $category = WebsiteCategory::where('website_id', $data['website_id'])->where('category_id', $catid)->select('category_id')->get();
|
|
|
$category = $category->toArray();
|
|
|
- if(!empty($category)){
|
|
|
- $where=[
|
|
|
+ if (!empty($category)) {
|
|
|
+ $where = [
|
|
|
'status' => 1,
|
|
|
- 'catid' => $catid
|
|
|
+ 'catid' => $catid,
|
|
|
];
|
|
|
- if($data['level']==1){
|
|
|
- $level=[
|
|
|
- 0=>'1',
|
|
|
- 1=>'4',
|
|
|
- 2=>'5'
|
|
|
+ if ($data['level'] == 1) {
|
|
|
+ $level = [
|
|
|
+ 0 => '1',
|
|
|
+ 1 => '4',
|
|
|
+ 2 => '5',
|
|
|
];
|
|
|
- $result = Article::where($where)->whereIn('level',$level)->orderBy("created_at","desc")->limit($data['pagesize'])->get();
|
|
|
- }elseif($data['level']==2){
|
|
|
- $level='2';
|
|
|
- $result = Article::where($where)->where('level',$level)->orderBy("created_at","desc")->limit($data['pagesize'])->get();
|
|
|
+ $result = Article::where($where)->whereIn('level', $level)->orderBy("created_at", "desc")->limit($data['pagesize'])->get();
|
|
|
+ } elseif ($data['level'] == 2) {
|
|
|
+ $level = '2';
|
|
|
+ $result = Article::where($where)->where('level', $level)->orderBy("created_at", "desc")->limit($data['pagesize'])->get();
|
|
|
|
|
|
- }else{
|
|
|
- $level='3';
|
|
|
- $result = Article::where($where)->where('level',$level)->orderBy("created_at","desc")->limit($data['pagesize'])->get();
|
|
|
+ } else {
|
|
|
+ $level = '3';
|
|
|
+ $result = Article::where($where)->where('level', $level)->orderBy("created_at", "desc")->limit($data['pagesize'])->get();
|
|
|
}
|
|
|
- $result= $result->toArray();
|
|
|
- if(!empty($result) && isset($data['placeid']) && !empty($data['placeid'])){
|
|
|
- $placeid=$data['placeid']-1;
|
|
|
- if($level==2 || $level==3){
|
|
|
- $where =[
|
|
|
- 'level' => $level
|
|
|
+ $result = $result->toArray();
|
|
|
+ if (!empty($result) && isset($data['placeid']) && !empty($data['placeid'])) {
|
|
|
+ $placeid = $data['placeid'] - 1;
|
|
|
+ if ($level == 2 || $level == 3) {
|
|
|
+ $where = [
|
|
|
+ 'level' => $level,
|
|
|
];
|
|
|
$result = Article::where($where)
|
|
|
- ->orderBy("created_at","desc")
|
|
|
- ->offset($placeid)
|
|
|
- ->limit($data['pagesize'])->get();
|
|
|
- }else{
|
|
|
+ ->orderBy("created_at", "desc")
|
|
|
+ ->offset($placeid)
|
|
|
+ ->limit($data['pagesize'])->get();
|
|
|
+ } else {
|
|
|
$result = Article::where($where)
|
|
|
- ->whereIn('level',$level)
|
|
|
- ->offset($placeid)
|
|
|
- ->orderBy("created_at","desc")
|
|
|
- ->limit($data['pagesize'])->get();
|
|
|
- }
|
|
|
+ ->whereIn('level', $level)
|
|
|
+ ->offset($placeid)
|
|
|
+ ->orderBy("created_at", "desc")
|
|
|
+ ->limit($data['pagesize'])->get();
|
|
|
+ }
|
|
|
}
|
|
|
- if(empty($result)){
|
|
|
- return Result::error("此栏目暂无相关新闻",0);
|
|
|
+ if (empty($result)) {
|
|
|
+ return Result::error("此栏目暂无相关新闻", 0);
|
|
|
}
|
|
|
- }else{
|
|
|
- return Result::error("此网站暂无此栏目",0);
|
|
|
-
|
|
|
+ } else {
|
|
|
+ return Result::error("此网站暂无此栏目", 0);
|
|
|
+
|
|
|
}
|
|
|
- return Result::success($result);
|
|
|
-
|
|
|
+ return Result::success($result);
|
|
|
+
|
|
|
}
|
|
|
-}
|
|
|
+}
|