浏览代码

健康E家,开始

lizhen_gitee 9 月之前
父节点
当前提交
72b30fa25e
共有 5 个文件被更改,包括 11 次插入10 次删除
  1. 3 3
      application/chat/Events.php
  2. 1 0
      application/config.php
  3. 5 5
      application/database.php
  4. 1 1
      gitpull.sh
  5. 1 1
      gitpullonline.sh

+ 3 - 3
application/chat/Events.php

@@ -49,7 +49,7 @@ class Events
          //file_put_contents('1.json',$message.PHP_EOL,FILE_APPEND);
          //$info = Db::name('gateway_test')->insertGetId(['msg'=>'[msg]'.$message,'datetime'=>date('Y-m-d H:i:s')]);
 
-         //Gateway::sendToAll($client_id.'说:'.$message);
+         Gateway::sendToAll($client_id.'说:'.$message);
 
          return;
 
@@ -74,13 +74,13 @@ class Events
      * 如果业务不需此回调可以删除onConnect
      * @param int $client_id 连接id
      */
-    /*public static function onConnect($client_id)
+    public static function onConnect($client_id)
     {
         // 向当前client_id发送数据
         Gateway::sendToClient($client_id, "Hello $client_id");
         // 向所有人发送
         Gateway::sendToAll("$client_id login");
-    }*/
+    }
 
 
 	/*{

+ 1 - 0
application/config.php

@@ -16,6 +16,7 @@ return [
 
     // 应用调试模式
     'app_debug'              => false,
+    'app_debug'              => true,
     // 应用Trace
     'app_trace'              => false,
     // 应用模式状态

+ 5 - 5
application/database.php

@@ -13,13 +13,13 @@ return [
     // 数据库类型
     'type'            => 'mysql',
     // 服务器地址
-    'hostname'        => '127.0.0.1',
+    'hostname'        => '106.54.206.212',
     // 数据库名
-    'database'        => 'test',
+    'database'        => 'jiankangyijia',
     // 用户名
-    'username'        => 'test',
+    'username'        => 'jiankangyijia',
     // 密码
-    'password'        => 'test',
+    'password'        => 'JGppTXKJxzjnYpZX',
     // 端口
     'hostport'        => '3306',
     // 连接dsn
@@ -29,7 +29,7 @@ return [
     // 数据库编码默认采用utf8
     'charset'         => 'utf8mb4',
     // 数据库表前缀
-    'prefix'          => 'hx_',
+    'prefix'          => '',
     // 数据库调试模式
     'debug'           => true,
     // 数据库部署方式:0 集中式(单一服务器),1 分布式(主从服务器)

+ 1 - 1
gitpull.sh

@@ -1,4 +1,4 @@
 sudo -uroot git reset --hard;
 sudo -uroot git pull;
-sudo -uroot chown -R www:www /www/wwwroot/kge_gatewayworker;
+sudo -uroot chown -R www:www /www/wwwroot/jiankang_gatewayworker;
 sudo -uroot chmod -R 777 *;

+ 1 - 1
gitpullonline.sh

@@ -1,4 +1,4 @@
 sudo -uroot git reset --hard;
 sudo -uroot git pull;
-sudo -uroot chown -R www:www /www/wwwroot/kge_gatewayworker;
+sudo -uroot chown -R www:www /www/wwwroot/jiankang_gatewayworker;
 sudo -uroot chmod -R 777 *;