up. 添加客户端锁定日志

This commit is contained in:
u2nyakim 2025-08-29 17:14:16 +08:00
parent 1e499f7717
commit 073cdf9c2b

View File

@ -87,7 +87,8 @@ class Worker extends Command
'client_name'=> $connection->clientName, 'client_name'=> $connection->clientName,
'user_id' => $connection->userId, 'user_id' => $connection->userId,
])->find(); ])->find();
$client->update(['is_lock'=>1,'lock_password'=>$lock_password,'lock_time'=>date('Y-m-d H:i:s')]); if($client) {
$client->save(['is_lock'=>1,'lock_password'=>$lock_password,'lock_time'=>date('Y-m-d H:i:s')]);
// 锁定屏幕 // 锁定屏幕
$connection->send(json_encode(['event'=>'LOCK_CLIENT_SCREEN'])); $connection->send(json_encode(['event'=>'LOCK_CLIENT_SCREEN']));
@ -101,6 +102,7 @@ class Worker extends Command
} }
} }
} }
}
}; };
$adminWorker->onClose = function ($connection) { $adminWorker->onClose = function ($connection) {
$this->app->event->trigger('admin.websocket.Close', $connection); $this->app->event->trigger('admin.websocket.Close', $connection);