推送模块

This commit is contained in:
2026-04-18 15:48:31 +08:00
parent e3f26ba1f7
commit 7d0f11fe43
19 changed files with 548 additions and 5 deletions

View File

@@ -0,0 +1,24 @@
<?php
declare(strict_types=1);
namespace app\common\library\admin;
/**
* 后台推送测试页:读取 webman/push 配置(与 game/Live::pushConfig 口径一致)
*/
final class PushChannelConfigHelper
{
public static function wsBaseUrl(): string
{
$ws = (string) config('plugin.webman.push.app.websocket');
$ws = str_replace('websocket://', 'ws://', $ws);
return str_replace('0.0.0.0', '127.0.0.1', $ws);
}
public static function appKey(): string
{
return (string) config('plugin.webman.push.app.app_key');
}
}