优化推送消息

This commit is contained in:
2026-04-20 14:49:02 +08:00
parent 1eed3cf0f7
commit ed21f8647e
4 changed files with 23 additions and 5 deletions

View File

@@ -3,6 +3,7 @@
namespace app\admin\controller\game;
use app\common\controller\Backend;
use app\common\library\admin\PushChannelConfigHelper;
use app\common\service\GameLiveService;
use support\Response;
use Webman\Http\Request as WebmanRequest;
@@ -44,12 +45,8 @@ class Live extends Backend
return $response;
}
$ws = (string) config('plugin.webman.push.app.websocket');
$ws = str_replace('websocket://', 'ws://', $ws);
$ws = str_replace('0.0.0.0', '127.0.0.1', $ws);
return $this->success('', [
'url' => $ws,
'url' => PushChannelConfigHelper::wsBaseUrl(),
'app_key' => (string) config('plugin.webman.push.app.app_key'),
'channel' => 'game-live',
'event' => 'bet-updated',