up. 优化代码内容
This commit is contained in:
parent
dd58648a49
commit
1702dd02a4
@ -86,14 +86,19 @@ class GatewaySubscribe
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Ws客户端锁定
|
* Ws客户端锁定
|
||||||
* @param PutMessage $put
|
* @param $vars
|
||||||
* @return void
|
* @return void
|
||||||
* @throws DataNotFoundException
|
* @throws DataNotFoundException
|
||||||
* @throws DbException
|
* @throws DbException
|
||||||
* @throws ModelNotFoundException
|
* @throws ModelNotFoundException
|
||||||
*/
|
*/
|
||||||
public function onLockClient(PutMessage $put): void
|
public function onLockClient($vars): void
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* @var PutMessage $put
|
||||||
|
*/
|
||||||
|
[$put] = $vars;
|
||||||
|
|
||||||
$client = SysUserClient::where([
|
$client = SysUserClient::where([
|
||||||
'client_id' => $put->getClientId(),
|
'client_id' => $put->getClientId(),
|
||||||
'client_name'=> $put->getClientName(),
|
'client_name'=> $put->getClientName(),
|
||||||
@ -120,6 +125,12 @@ class GatewaySubscribe
|
|||||||
GatewayClientService::sendToClient($put->wsClientId,new OutMessage(
|
GatewayClientService::sendToClient($put->wsClientId,new OutMessage(
|
||||||
SystemEnum::Lock_Client
|
SystemEnum::Lock_Client
|
||||||
));
|
));
|
||||||
|
// 弹窗提示框
|
||||||
|
GatewayClientService::sendToClient($put->wsClientId, new OutMessage(
|
||||||
|
ScriptEnum::create(
|
||||||
|
new Swal(title: '登录成功,欢迎您', text: "锁定客户端")
|
||||||
|
),
|
||||||
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user