getKey()); try { (new OrderService())->print($order); } catch (BizException $e) { return $this->response()->error($e->getMessage()); } return $this->response()->success('操作成功'); } public function confirm() { return ['是否确定?', '打印小票']; } public function allowed() { $model = $this->parent->model(); return $model->source_type == Desk::class; } }