diff --git a/application/admin/controller/Content.php b/application/admin/controller/Content.php index 381b2634..b2c11aff 100644 --- a/application/admin/controller/Content.php +++ b/application/admin/controller/Content.php @@ -10,6 +10,10 @@ namespace app\admin\controller; use app\common\controller\Admin; + +/** + * @title 内容管理 + */ class Content extends Admin { public function _initialize() { @@ -30,7 +34,7 @@ class Content extends Admin { } /** - * 内容列表 + * @title 内容列表 * @return [html] [页面内容] * @author molong */ @@ -64,7 +68,7 @@ class Content extends Admin { } /** - * 内容添加 + * @title 内容添加 * @author molong */ public function add() { @@ -97,7 +101,7 @@ class Content extends Admin { } /** - * 内容修改 + * @title 内容修改 * @author molong */ public function edit($id) { @@ -135,7 +139,7 @@ class Content extends Admin { } /** - * 内容删除 + * @title 内容删除 * @author molong */ public function del() { @@ -158,7 +162,7 @@ class Content extends Admin { } /** - * 设置状态 + * @title 设置状态 * @author molong */ public function status($id, $status) { @@ -172,7 +176,7 @@ class Content extends Admin { } /** - * 设置置顶 + * @title 设置置顶 * @author molong */ public function settop($id, $is_top) { @@ -186,7 +190,7 @@ class Content extends Admin { } /** - * 获取字段信息 + * @title 获取字段信息 * @return array 字段数组 * @author molong */ @@ -216,7 +220,7 @@ class Content extends Admin { } /** - * 创建搜索 + * @title 创建搜索 * @return [array] [查询条件] */ protected function buildMap() { diff --git a/application/admin/controller/Database.php b/application/admin/controller/Database.php index 92bd9d21..6b6e0819 100644 --- a/application/admin/controller/Database.php +++ b/application/admin/controller/Database.php @@ -10,6 +10,10 @@ namespace app\admin\controller; use app\common\controller\Admin; +/** + * @title 数据库管理 + * @description 数据库管理 + */ class Database extends Admin { /** * 数据库备份/还原列表 @@ -71,7 +75,7 @@ class Database extends Admin { return $this->fetch($type); } /** - * 优化表 + * @title 优化表 * @param String $tables 表名 * @author 麦当苗儿 */ @@ -100,7 +104,7 @@ class Database extends Admin { } } /** - * 修复表 + * @title 修复表 * @param String $tables 表名 * @author 麦当苗儿 */ @@ -129,7 +133,7 @@ class Database extends Admin { } } /** - * 删除备份文件 + * @title 删除备份文件 * @param Integer $time 备份时间 * @author 麦当苗儿 */ @@ -148,7 +152,7 @@ class Database extends Admin { } } /** - * 备份数据库 + * @title 备份数据库 * @param String $tables 表名 * @param Integer $id 表ID * @param Integer $start 起始行数 @@ -222,7 +226,7 @@ class Database extends Admin { } } /** - * 还原数据库 + * @title 还原数据库 * @author 麦当苗儿 */ public function import($time = 0, $part = null, $start = null) { diff --git a/application/admin/controller/Form.php b/application/admin/controller/Form.php index 5d317068..20a8f9df 100644 --- a/application/admin/controller/Form.php +++ b/application/admin/controller/Form.php @@ -10,6 +10,10 @@ namespace app\admin\controller; use app\common\controller\Admin; +/** + * @title 自定义表单 + * @description 自定义表单 + */ class Form extends Admin { public function _initialize() { @@ -23,7 +27,9 @@ class Form extends Admin { $this->field = $this->getField(); } - //自定义表单 + /** + * @title 表单列表 + */ public function index() { $map = array(); $order = "id desc"; @@ -41,7 +47,7 @@ class Form extends Admin { } /** - * 添加表单 + * @title 添加表单 */ public function add(\think\Request $request) { if ($this->request->isPost()) { @@ -62,7 +68,7 @@ class Form extends Admin { } /** - * 编辑表单 + * @title 编辑表单 */ public function edit(\think\Request $request) { if ($this->request->isPost()) { @@ -85,7 +91,7 @@ class Form extends Admin { } /** - * 删除表单 + * @title 删除表单 */ public function del() { $id = $this->getArrayParam('id'); @@ -119,6 +125,9 @@ class Form extends Admin { return $this->fetch('list_'.$form['name']); } + /** + * @title 数据详情 + */ public function detail($form_id = '', $id = ''){ $form = $this->model->where('id', $form_id)->find(); @@ -132,7 +141,9 @@ class Form extends Admin { return $this->fetch('detail_'.$form['name']); } - //数据导出 + /** + * @title 数据导出 + */ public function outxls($form_id = '') { $form = $this->model->where('id', $form_id)->find(); @@ -152,6 +163,9 @@ class Form extends Admin { $out->out(); } + /** + * @title 表单字段 + */ public function attr($form_id = '') { $map = array(); $order = "id desc"; @@ -167,6 +181,9 @@ class Form extends Admin { return $this->fetch(); } + /** + * @title 添加表单字段 + */ public function addattr(){ $form_id = $this->request->param('form_id', ''); if (!$form_id) { @@ -194,6 +211,9 @@ class Form extends Admin { } } + /** + * @title 编辑表单字段 + */ public function editattr(\think\Request $request){ $param = $this->request->param(); @@ -222,6 +242,9 @@ class Form extends Admin { } } + /** + * @title 删除表单字段 + */ public function delattr(\think\Request $request){ $id = $request->param('id', 0); if (!$id) { diff --git a/application/admin/controller/Group.php b/application/admin/controller/Group.php index b983687d..451969df 100644 --- a/application/admin/controller/Group.php +++ b/application/admin/controller/Group.php @@ -10,6 +10,10 @@ namespace app\admin\controller; use app\common\controller\Admin; +/** + * @title 用户组管理 + * @description 用户组管理 + */ class Group extends Admin { protected $model; @@ -21,7 +25,9 @@ class Group extends Admin { $this->rule = model('AuthRule'); } - //会员分组首页控制器 + /** + * @title 用户组列表 + */ public function index($type = 'admin') { $map['module'] = $type; @@ -39,7 +45,9 @@ class Group extends Admin { return $this->fetch(); } - //会员分组添加控制器 + /** + * @title 添加用户组 + */ public function add($type = 'admin') { if ($this->request->isPost()) { $result = $this->group->change(); @@ -59,7 +67,9 @@ class Group extends Admin { } } - //会员分组编辑控制器 + /** + * @title 编辑用户组 + */ public function edit($id) { if (!$id) { return $this->error("非法操作!"); @@ -83,7 +93,10 @@ class Group extends Admin { } } - //会员分组编辑字段控制器 + + /** + * @title 编辑用户组单字段 + */ public function editable() { $pk = input('pk', '', 'trim,intval'); $name = input('name', '', 'trim'); @@ -96,7 +109,10 @@ class Group extends Admin { } } - //会员分组删除控制器 + + /** + * @title 删除用户组 + */ public function del() { $id = $this->getArrayParam('id'); if (empty($id)) { @@ -110,7 +126,10 @@ class Group extends Admin { } } - //权限节点控制器 + + /** + * @title 权限节点 + */ public function access($type = 'admin') { $map['module'] = $type; @@ -128,7 +147,9 @@ class Group extends Admin { return $this->fetch(); } - //根据菜单更新节点 + /** + * @title 更新权限 + */ public function upnode($type) { //$rule = model('Menu')->getAuthNodes($type); $reuslt = $this->rule->uprule($type); @@ -136,7 +157,7 @@ class Group extends Admin { } /** - * 授权 + * @title 用户组授权 */ public function auth($id) { if (!$id) { @@ -197,6 +218,9 @@ class Group extends Admin { } } + /** + * @title 添加节点 + */ public function addnode($type = 'admin') { if ($this->request->isPost()) { $result = $this->rule->change(); @@ -216,6 +240,9 @@ class Group extends Admin { } } + /** + * @title 编辑节点 + */ public function editnode($id) { if ($this->request->isPost()) { $result = $this->rule->change(); @@ -239,6 +266,9 @@ class Group extends Admin { } } + /** + * @title 删除节点 + */ public function delnode($id) { if (!$id) { return $this->error("非法操作!"); diff --git a/application/common/model/AuthRule.php b/application/common/model/AuthRule.php index c0372fd4..69994b5e 100644 --- a/application/common/model/AuthRule.php +++ b/application/common/model/AuthRule.php @@ -30,14 +30,14 @@ class AuthRule extends Base{ array('name'=>'condition','title'=>'条件','type'=>'text','help'=>'') ); - public $filter_method = array('__construct', 'execute', 'sqlSplit', 'isMobile', 'is_wechat', '_initialize'); + public $filter_method = array('__construct', 'execute', 'login', 'sqlSplit', 'isMobile', 'is_wechat', '_initialize'); public function uprule($type){ $data = $this->updaterule($type); foreach ($data as $value) { $id = $this->where(array('name' => $value['name']))->value('id'); if ($id) { - $save['id'] = $id; + $value['id'] = $id; } $list[] = $value; }