fixed register ip

This commit is contained in:
weiz 2023-10-20 17:28:41 +08:00
parent d79fabc563
commit e66e0d1a68
2 changed files with 9 additions and 2 deletions

View File

@ -8,12 +8,19 @@ use app\common\model\Company;
use app\common\model\im\UserImMessage; use app\common\model\im\UserImMessage;
use app\common\model\user\User; use app\common\model\user\User;
use GatewayClient\Gateway; use GatewayClient\Gateway;
use think\App;
use think\facade\Db; use think\facade\Db;
use think\response\Json; use think\response\Json;
class ImController extends BaseLikeAdminController class ImController extends BaseLikeAdminController
{ {
//获取场景值 public function __construct(App $app)
{
parent::__construct($app);
Gateway::$registerAddress = "172.19.97.179:1236";
}
//获取场景值
private function sceneText($scene): string private function sceneText($scene): string
{ {
if($scene == 0){ if($scene == 0){

View File

@ -23,7 +23,7 @@ $gateway->lanIp = '172.19.97.179';
$gateway->startPort = 3900; $gateway->startPort = 3900;
// 服务注册地址 // 服务注册地址
$gateway->registerAddress = '172.19.97.179:1236'; $gateway->registerAddress = '127.0.0.1:1236';
// 心跳间隔 // 心跳间隔
$gateway->pingInterval = 20; $gateway->pingInterval = 20;