<?php
class workermanModel extends CI_Model{
    public function __construct()
    {
        parent::__construct();
        $this->load->helper('url');
        $this->load->helper('cookie');
        $this->load->library('curl');
        $this->load->library('pagination');
        $this->load->model('oo');
    }

    public function push($uid,$cmd,$data){
        $posts = ['frombg'=>1,'lid' =>1,'sid'=>1];
        $posts['mod'] = 'Workerman';
        $posts['act'] = 'push';
        $posts['uid'] = $uid;
        $posts['cmd'] = $cmd;
        $posts['data']= json_encode($data);
        $url  = $this->config->item('officialUrl');
        $conf = $this->curl->req($url, $posts);
        if(empty($conf)){
            return false;
        }
        return true;
    }
}
