| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 | 
							- <?php
 
- namespace app\admin\controller;
 
- use app\common\controller\Backend;
 
- use app\common\library\Easemob;
 
- use think\Db;
 
- /**
 
-  * 全部用户环信推送
 
-  *
 
-  * @icon fa fa-circle-o
 
-  */
 
- class Messagets extends Backend
 
- {
 
-     
 
-     /**
 
-      * Messagets模型对象
 
-      * @var \app\admin\model\Messagets
 
-      */
 
-     protected $model = null;
 
-     public function _initialize()
 
-     {
 
-         parent::_initialize();
 
-         $this->model = new \app\admin\model\Messagets;
 
-     }
 
-     public function import()
 
-     {
 
-         parent::import();
 
-     }
 
-     /**
 
-      * 推送
 
-      */
 
-     public function huanxinpush(){
 
-         $id = input('id',0);
 
-         $info = Db::name('message_ts')->where('id',$id)->find();
 
-         Db::name('message_ts')->where('id',$id)->setInc('times');
 
-         //全量推送
 
-         $easemob = new Easemob();
 
-         $easemob->push_all($info['title'],$info['info']);
 
-         $this->success('推送完成');
 
-     }
 
-     
 
- }
 
 
  |