colly_wyx
2018-05-03 1237ba717c8e1902662747b94f7d302a6310cb8c
application/core/System/Controller/Base.php
@@ -52,19 +52,13 @@
        $this->route = $this->getRoute();
        //初始化redis
        $this->redis = System_Service_Locator::getInstance()->get('redis');
        if(!$this->redis->exists('modules') ){
          $this->redis->set('modules', $this->getModules());
        }
         //更新角色权限
        if(!$this->redis->exists('role_auth')){
          Util::updateRoleAuth();
        }
        //是否渲染模板
        if(!empty($this->layout)){
            //根据角色权限访问
            //$this->modules = $this->modules_service->getModuleListByRoleId();
            $this->setLayout($this->layout);
        }
        //将当前路由值传入模板
        $this->getView()->assign('route', $this->route);
    }
@@ -128,12 +122,5 @@
        return $this->getRequest()->isXmlHttpRequest();
    }
    /**
     * 获取栏目列表
     * @return [type] [description]
     */
    public function getModules(){
        $this->module_service = new Service_Module();
        return $this->module_service->getModuleList(array(), array(), array('level' => 1));
    }
}