beanRepository = $beanRepository; } //获取指定时间彩虹豆收支明细 public function beanDetail(Request $request) { $validator = Validator::make($request->all(), [ 'type' => ['required',Rule::in([0,1,2,3])], ]); if ($validator->fails()) { return $this->jsonError($validator->errors()->first()); } $beanDetail = $this->beanRepository->beanDetail($request->all()); if ($beanDetail){ return $this->jsonSuccess($beanDetail); }else{ return $this->jsonSuccess(); } } //排行榜 public function rankingList(Request $request) { $validator = Validator::make($request->all(), [ 'type' => ['required',Rule::in([0,1, 2])], ]); if ($validator->fails()) { return $this->jsonError($validator->errors()->first()); } $top_most = $this->beanRepository->rankingList($request->all()); if ($top_most){ return $this->jsonSuccess($top_most); }else{ return $this->jsonSuccess(); } } //星球首页 public function starHome(Request $request) { $star_home = $this->beanRepository->starHome($request->all()); if ($star_home){ return $this->jsonSuccess($star_home); }else{ return $this->jsonSuccess(); } } }