|
|
@@ -4,6 +4,7 @@
|
|
|
namespace ghs\controllers;
|
|
|
|
|
|
use bizGhs\ws\services\WsService;
|
|
|
+use common\components\goWs;
|
|
|
use common\components\util;
|
|
|
use Yii;
|
|
|
use GatewayClient\Gateway;
|
|
|
@@ -19,17 +20,19 @@ class WsController extends BaseController
|
|
|
$post = Yii::$app->request->post();
|
|
|
$clientId = isset($post['clientId']) ? $post['clientId'] : '';
|
|
|
$shopAdminId = $this->shopAdminId;
|
|
|
- Yii::info("ws band shopAdminId clientId ". $shopAdminId.'---'.$clientId);
|
|
|
- Gateway::bindUid($clientId, $shopAdminId);
|
|
|
+ // Yii::info("ws band shopAdminId clientId ". $shopAdminId.'---'.$clientId);
|
|
|
+ //Gateway::bindUid($clientId, $shopAdminId);
|
|
|
+ goWs::bindUid($shopAdminId,$clientId);
|
|
|
util::complete();
|
|
|
}
|
|
|
|
|
|
//关闭当前链接
|
|
|
public function actionClose()
|
|
|
{
|
|
|
- $post = Yii::$app->request->post();
|
|
|
- $clientId = isset($post['clientId']) ? $post['clientId'] : '';
|
|
|
- Gateway::closeClient($clientId);
|
|
|
+// $post = Yii::$app->request->post();
|
|
|
+// $clientId = isset($post['clientId']) ? $post['clientId'] : '';
|
|
|
+// Gateway::closeClient($clientId);
|
|
|
+//
|
|
|
}
|
|
|
|
|
|
//模拟推送ws (仅供测试联调用)
|