beanRepository = $beanRepository; } //排行榜 public function rankingList(Request $request) { $data = $request->all(); $validator = Validator::make($data, [ 'type' => ['required',Rule::in([0,1, 2])], ]); if ($validator->fails()) { return $this->jsonError($validator->errors()->first()); } $top_most = $this->beanRepository->rankingList($data); return success(['list'=>$top_most]); } //分享/邀请首页 public function starDetail(Request $request) { $validator = Validator::make($request->all(), [ 'invite_code' => 'required', ]); if ($validator->fails()) { return $this->jsonError($validator->errors()->first()); } $star_detail = $this->beanRepository->starDetail($request->all()); if ($star_detail){ return $this->jsonSuccess($star_detail); }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(); } } }