Json::class, 'sysConfig' => SystemConfigService::class, ]; public function register() { // 服务注册 //http配置服务 $this->app->bind(HttpCommonConfig::class, function () { return (new HttpCommonConfig())->setServe(SystemConfigServices::class); }); //公众号 $this->app->bind(OfficialAccount::class, function () { return (new OfficialAccount)->setPushMessageHandler(OffcialAccountListener::class); }); //小程序 $this->app->bind(MiniProgram::class, function () { return (new MiniProgram)->setPushMessageHandler(RoutineListener::class); }); //开放平台 $this->app->bind(OpenPlatform::class, function () { return (new OpenPlatform)->setPushMessageHandler(OpenPlatformListener::class); }); } public function boot() { defined('DS') || define('DS', DIRECTORY_SEPARATOR); DefaultHandler::setDefaultHandler(SwooleHandler::class); } }