|
|
@@ -21,12 +21,12 @@ 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){
|
|
|
-// Gateway::sendToClient($clientId, json_encode($data));
|
|
|
-// }
|
|
|
+ // Gateway::sendToUid($adminId, json_encode($data));
|
|
|
+ $clientId = Yii::$app->cache->get($adminId);
|
|
|
+ Yii::info("clientId:".$clientId);
|
|
|
+ if($clientId){
|
|
|
+ Gateway::sendToClient($clientId, json_encode($data));
|
|
|
+ }
|
|
|
if($online){
|
|
|
|
|
|
}else{
|