123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- <?php
- namespace app\admin\controller;
- use app\common\controller\Backend;
- use think\Db;
- use app\common\library\Getui;
- class Messagesys extends Backend
- {
-
- protected $model = null;
- public function _initialize()
- {
- parent::_initialize();
- $this->model = new \app\admin\model\Messagesys;
- $this->view->assign("isIndexList", $this->model->getIsIndexList());
- $this->view->assign("isShowList", $this->model->getIsShowList());
- $this->view->assign("pushStatusList", $this->model->getPushStatusList());
- }
-
-
- public function tuisong(){
- $id = input('id',0);
- $info = Db::name('message_sys')->where('id',$id)->find();
- Db::name('message_sys')->where('id',$id)->update(['push_status' => 1]);
- $getui = new Getui();
- $title = $info['title_en'];
- $body = $info['info_en'];
- $rs = $getui->sendtoall($title, $body, 1, 'android');
- $rs = $getui->sendtoall($title, $body, 1, 'ios');
- $this->success('推送完成');
- }
- }
|