增加消息推送

This commit is contained in:
mzl
2025-10-12 06:22:29 +00:00
parent 8e89ffdcf5
commit 7e820ee9c4
8 changed files with 441 additions and 38 deletions
+11 -8
View File
@@ -102,14 +102,17 @@ class IndexController
public function test(Request $request)
{
$result = $this->tocurl('https://magicbridgeauto.com');
if (preg_match('/magicbridgeauto/', $result['body'])) {
echo "未被篡改";
flg("【magicbridgeauto】未被篡改");
} else {
echo "已被篡改";
flg("【magicbridgeauto】已被篡改");
}
// $chain = \app\common\service\MenuBadgeService::buildBadgeChain(menuId: 226, leafCount: rand(1, 10));
// (new \app\common\utils\WsEvents())->pushWebsocket('approval.todo.counts', 74, $chain);
$data = [
'event' => 'approval.todo.counts',
'user_id' => 74,
'num' => rand(1, 10),
];
\Webman\RedisQueue\Redis::send('ws-msg', $data);
return json(['code' => 0, 'msg' => 'success']);
}