|
|
@@ -4,6 +4,7 @@ namespace bizGhs\ws\services;
|
|
|
|
|
|
use common\components\baiduAip;
|
|
|
use common\components\dict;
|
|
|
+use common\components\goWs;
|
|
|
use common\components\util;
|
|
|
use GatewayClient\Gateway;
|
|
|
use Yii;
|
|
|
@@ -19,11 +20,13 @@ class WsService
|
|
|
try{
|
|
|
$audio = base64_encode($audio);
|
|
|
$data = ['type' => 'money','url'=>'data:audio/mp3;base64,'.$audio, 'msg' => $msg,'money'=>$money];
|
|
|
+ $dataString = json_encode($data);
|
|
|
+ goWs::sendToUid($adminId,$dataString);
|
|
|
//判断是否在线
|
|
|
// $online = Gateway::isUidOnline($adminId);
|
|
|
- Gateway::sendToUid($adminId, json_encode($data));
|
|
|
- $client = Gateway::getClientIdByUid($adminId);
|
|
|
- Yii::info("getClientIdByUid res :".json_encode($client));
|
|
|
+ //Gateway::sendToUid($adminId, json_encode($data));
|
|
|
+ //$client = Gateway::getClientIdByUid($adminId);
|
|
|
+ //Yii::info("getClientIdByUid res :".json_encode($client));
|
|
|
|
|
|
}catch (\Exception $exception){
|
|
|
Yii::warning("ws arrivalNotice error ". $exception->getMessage());
|
|
|
@@ -61,7 +64,9 @@ class WsService
|
|
|
try{
|
|
|
//判断是否在线
|
|
|
//$online = Gateway::isUidOnline($shopAdminId);
|
|
|
- Gateway::sendToUid($shopAdminId, json_encode($data));
|
|
|
+ $dataString = json_encode($data);
|
|
|
+ goWs::sendToUid($shopAdminId,$dataString);
|
|
|
+ //Gateway::sendToUid($shopAdminId, json_encode($data));
|
|
|
// if($online){
|
|
|
//
|
|
|
// }else{
|