コード例 #1
0
 public function _initialize()
 {
     parent::_initialize();
     $this->openid = get_openid();
     if ($this->openid == false) {
         $this->error('非法操作');
     }
     $this->token = get_token();
     $this->data = D('youaskservice_logs');
 }
コード例 #2
0
 function _initialize()
 {
     parent::_initialize();
     // 子导航
     $action = strtolower(_ACTION);
     $controller = strtolower(_CONTROLLER);
     $res['title'] = '工号管理';
     $res['url'] = addons_url('YouaskService://YouaskService/lists');
     $res['class'] = $action == 'lists' ? 'cur' : '';
     $nav[] = $res;
     $res['title'] = '客服分组';
     $res['url'] = addons_url('YouaskService://Group/lists');
     $res['class'] = $controller == "group" && $action == 'lists' ? 'cur' : '';
     $nav[] = $res;
     $res['title'] = '客服在线状态';
     $res['url'] = addons_url('YouaskService://YouaskService/kfzxstate');
     $res['class'] = $action == 'kfzxstate' ? 'cur' : '';
     $nav[] = $res;
     $this->assign('sub_nav', $nav);
 }
コード例 #3
0
 function _initialize()
 {
     parent::_initialize();
     $this->model = $this->getModel('youaskservice_keyword');
     $this->model || $this->error('模型不存在!');
 }