123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899 |
- <?php
- namespace app\api\controller;
- use app\common\controller\Api;
- use app\common\library\Easemob;
- use app\common\library\Tenim;
- class Demo extends Api
- {
-
-
-
-
-
- protected $noNeedLogin = ['*'];
-
- protected $noNeedRight = ['test2'];
-
- public function test()
- {
- $easemob = new Easemob();
- $rs = $easemob->user_create('doctor1');
- }
-
- public function test1()
- {
- $tenim = new Tenim();
- $rs = $tenim->register('user'. 1, 'nickname', '');
- }
-
- public function test2()
- {
- $tenim = new Tenim();
- $order_id = 26;
- $message = [
- 'businessID' => 'order_status',
- 'name' => '待接单',
- 'status' => '10',
- 'id' => (string)$order_id,
- 'content' => '已通知医生尽快接诊,超时自动取消订单并退款',
- ];
- $rs = $tenim->sendCustomMessageToUser('user7','doctor7',$message);
- dump($rs);
- }
-
- public function test3()
- {
- $a = 346846154;
- dump(format_bytes($a));
- }
- public function test4(){
- $a = time() - 20;
- dump($a);
- dump(get_last_time($a));
- }
- }
|