repository = $repository; $this->userInfo = $this->request->isLogin() ? $this->request->userInfo() : null; } public function lst() { [$page, $limit] = $this->getPage(); $where = $this->request->params(['type','star']); return app('json')->success($this->repository->getApiList($where,$page, $limit)); } public function detail($id) { $uid = $this->userInfo ? $this->userInfo->uid : null; $data = $this->repository->apiDetail($id,$this->userInfo); return app('json')->success($data); } public function getAgree() { $make = app()->make(CacheRepository::class); return app('json')->success(['sys_product_presell_agree' => $make->getResult('sys_product_presell_agree')]); } }