林琦海 5 lat temu
rodzic
commit
663e6ca49a
1 zmienionych plików z 4 dodań i 2 usunięć
  1. 4 2
      biz-ghs/ws/services/WsService.php

+ 4 - 2
biz-ghs/ws/services/WsService.php

@@ -21,8 +21,9 @@ 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));
                 if($online){
-                    Gateway::sendToUid($adminId, json_encode($data));
+
                 }else{
                     Yii::info("用户不在线:".$adminId);
                 }
@@ -63,8 +64,9 @@ class WsService
         try{
             //判断是否在线
             $online = Gateway::isUidOnline($shopAdminId);
+            Gateway::sendToUid($shopAdminId, json_encode($data));
             if($online){
-                Gateway::sendToUid($shopAdminId, json_encode($data));
+
             }else{
                 Yii::info("用户不在线:".$shopAdminId);
             }