model = new ManystoreShop; parent::_initialize(); //判断登录用户是否是员工 } /** * @ApiTitle( 机构详情) * @ApiSummary(机构详情) * @ApiRoute(/api/school/shop/detail) * @ApiMethod(GET) * @ApiParams(name = "id", type = "int",required=true,description = "机构id") * @ApiReturn({ * *}) */ public function detail(){ $id = $this->request->get('id/d',''); if(empty($id)){ $this->error(__('缺少必要参数')); } try { $res = $this->model->detail($id); } catch (\Exception $e){ // Log::log($e->getMessage()); $this->error($e->getMessage(),['errcode'=>$e->getCode()]); } $this->success('获取成功', ['detail' => $res]); } }