Browse Source

修改空数据返回格式

duqinya 5 years ago
parent
commit
0b350cafac
1 changed files with 3 additions and 27 deletions
  1. 3 27
      app/Http/Controllers/V1/BeanDetailController.php

+ 3 - 27
app/Http/Controllers/V1/BeanDetailController.php

@@ -32,29 +32,7 @@ class BeanDetailController extends Controller
         if ($beanDetail){
         if ($beanDetail){
             return $this->jsonSuccess($beanDetail);
             return $this->jsonSuccess($beanDetail);
         }else{
         }else{
-            return $this->jsonError('没有找到对应彩虹豆明细');
-        }
-    }
-
-    //获取星球-用户彩虹豆相关信息
-    public function getBean(Request $request)
-    {
-        $user_bean = $this->beanRepository->getBean($request->all());
-        if ($user_bean){
-            return $this->jsonSuccess($user_bean);
-        }else{
-            return $this->jsonError('没有找到星球彩虹豆信息');
-        }
-    }
-
-    //昨日优秀居民
-    public function excellentResidents(Request $request)
-    {
-        $excellent_residents = $this->beanRepository->excellentResidents($request->all());
-        if ($excellent_residents){
-            return $this->jsonSuccess($excellent_residents);
-        }else{
-            return $this->jsonError('没有找到昨日优秀居民相关信息');
+            return $this->jsonSuccess();
         }
         }
     }
     }
 
 
@@ -71,9 +49,8 @@ class BeanDetailController extends Controller
         if ($top_most){
         if ($top_most){
             return $this->jsonSuccess($top_most);
             return $this->jsonSuccess($top_most);
         }else{
         }else{
-            return $this->jsonError('没有找到排行榜相关信息');
+            return $this->jsonSuccess();
         }
         }
-
     }
     }
 
 
     //星球首页
     //星球首页
@@ -83,8 +60,7 @@ class BeanDetailController extends Controller
         if ($star_home){
         if ($star_home){
             return $this->jsonSuccess($star_home);
             return $this->jsonSuccess($star_home);
         }else{
         }else{
-            return $this->jsonError('没有找到星球首页相关信息');
+            return $this->jsonSuccess();
         }
         }
-
     }
     }
 }
 }