|
|
@@ -20,16 +20,9 @@ class WsService
|
|
|
$audio = base64_encode($audio);
|
|
|
$data = ['type' => 'money','url'=>'data:audio/mp3;base64,'.$audio, 'msg' => $msg,'money'=>$money];
|
|
|
//判断是否在线
|
|
|
- $online = Gateway::isUidOnline($adminId);
|
|
|
- $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{
|
|
|
- Yii::info("用户不在线:".$adminId);
|
|
|
- }
|
|
|
+ // $online = Gateway::isUidOnline($adminId);
|
|
|
+ Gateway::sendToUid($adminId, json_encode($data));
|
|
|
+ Yii::info("getClientIdByUid res :".json_encode($client));
|
|
|
|
|
|
}catch (\Exception $exception){
|
|
|
Yii::warning("ws arrivalNotice error ". $exception->getMessage());
|
|
|
@@ -66,13 +59,13 @@ class WsService
|
|
|
Yii::info("触发订单通知:".$shopAdminId);
|
|
|
try{
|
|
|
//判断是否在线
|
|
|
- $online = Gateway::isUidOnline($shopAdminId);
|
|
|
+ //$online = Gateway::isUidOnline($shopAdminId);
|
|
|
Gateway::sendToUid($shopAdminId, json_encode($data));
|
|
|
- if($online){
|
|
|
-
|
|
|
- }else{
|
|
|
- Yii::info("用户不在线:".$shopAdminId);
|
|
|
- }
|
|
|
+// if($online){
|
|
|
+//
|
|
|
+// }else{
|
|
|
+// Yii::info("用户不在线:".$shopAdminId);
|
|
|
+// }
|
|
|
}catch (\Exception $exception){
|
|
|
Yii::warning("ws arrivalNotice error ". $exception->getMessage());
|
|
|
}
|