// +---------------------------------------------------------------------- namespace app\controller\admin; use app\controller\Admin; use app\model\Config as ConfigModel; class Config extends Admin{ /** * @title 系统首页 */ public function index(){ } /** * @title 系统首页 */ public function group(ConfigModel $config){ if ($this->request->isAjax()) { # code... }else{ $this->data['id'] = $this->request->param('id', 1); $res = $config->where(array('status' => 1, 'group' => $this->data['id']))->field('id,name,title,extra,value,remark,type')->order('sort')->select(); $this->data['list'] = $res->toArray(); return $this->data; } } /** * @title 主题设置 */ public function themes(){ } }