validated();// 获取校验参数结果 /** * 获取用户信息 */ $user = AuthUser::getInstance()->get(); $model = new DemoModel(); $list = $model->getList($params); $setup = site('logo'); // 测试投递异步队列消息 $this->service->demoPush(['name' => 'one'], 10); // 携程 闭包 co(function () use ($params){ sleep(10); }); return AppResult::response200('Coming Soon!!!', [ 'params' => $params, 'list' => $list, 'module_setup' => $setup, ]); } /** * 原始示例 * @param ServerRequestInterface $request * @return string */ public function demo01(ServerRequestInterface $request) { return AppResult::response200('Coming Soon!!!', [ // 获取请求参数方式 'params' => $request->getQueryParams() ]); } }