|
|
@@ -21,13 +21,10 @@ class WsService
|
|
|
$data = ['type' => 'money','url'=>'data:audio/mp3;base64,'.$audio, 'msg' => $msg,'money'=>$money];
|
|
|
//判断是否在线
|
|
|
$online = Gateway::isUidOnline($adminId);
|
|
|
- // Gateway::sendToUid($adminId, json_encode($data));
|
|
|
- $clientId = Yii::$app->cache->get($adminId);
|
|
|
- Yii::info("clientId:".$clientId);
|
|
|
- if($clientId){
|
|
|
- $res = Gateway::sendToClient($clientId, json_encode($data));
|
|
|
- Yii::info("clientId:res".base64_encode($res));
|
|
|
- }
|
|
|
+ $res = Gateway::sendToUid($adminId, json_encode($data));
|
|
|
+ Yii::info("sendToUid res :".$res);
|
|
|
+ $client = Gateway::getClientIdByUid($adminId);
|
|
|
+ Yii::info("getClientIdByUid res :".json_encode($res));
|
|
|
if($online){
|
|
|
|
|
|
}else{
|