repository = $repository; } /*生成订单*/ public function createOrder(){ $params = $this->request->params([ 'type', ]); $uid = $this->request->uid(); if (!$params['type']){ return app('json')->fail('请检查参数'); } $result = $this->repository->createOrder($uid,$params['type']); if($result['code'] == 400){ return app('json')->fail($result['msg']); } return app('json')->success("成功",$result); } }