Browse Source

判断患者用户im是否在线

lizhen_gitee 10 months ago
parent
commit
e2a671f989
1 changed files with 10 additions and 3 deletions
  1. 10 3
      application/api/controller/Demo.php

+ 10 - 3
application/api/controller/Demo.php

@@ -97,9 +97,16 @@ class Demo extends Api
     }
 
     public function test4(){
-        $a = time() - 20;
-        dump($a);
-        dump(get_last_time($a));
+        $wenzhen_order['user_id'] = 13;
+        //判断患者在线状态
+        $tenim = new Tenim();
+        $rs_online = $tenim->is_online('user'.$wenzhen_order['user_id']);
+
+        if($rs_online != true){
+            $this->error('患者现在不在线,请稍后拨打');
+        }
+
+        echo '在线';
     }