From 1b11d9e1e8be756dd676600324ecddb37369d81f Mon Sep 17 00:00:00 2001 From: molong Date: Tue, 8 May 2018 15:57:04 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=8E=E5=8F=B0=E6=96=87=E4=BB=B6=E6=B3=A8?= =?UTF-8?q?=E9=87=8A=E5=A2=9E=E5=8A=A0=EF=BC=8C=E4=B8=BA=E5=81=9A=E6=9D=83?= =?UTF-8?q?=E9=99=90=E8=8A=82=E7=82=B9=E8=87=AA=E5=8A=A8=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/admin/controller/Goods.php | 7 ------- application/admin/controller/Link.php | 20 ++++++++++++++++--- application/admin/controller/Menu.php | 19 +++++++++++++----- application/admin/controller/Model.php | 17 ++++++++-------- application/admin/controller/Seo.php | 27 ++++++++++++++++++++++++++ application/admin/controller/User.php | 24 +++++++++++++++-------- 6 files changed, 82 insertions(+), 32 deletions(-) delete mode 100644 application/admin/controller/Goods.php diff --git a/application/admin/controller/Goods.php b/application/admin/controller/Goods.php deleted file mode 100644 index 25277686..00000000 --- a/application/admin/controller/Goods.php +++ /dev/null @@ -1,7 +0,0 @@ -fetch(); } - //添加 + /** + * @title 添加链接 + */ public function add() { $link = model('Link'); if ($this->request->isPost()) { @@ -55,7 +64,10 @@ class Link extends Admin { } } - //修改 + + /** + * @title 修改链接 + */ public function edit() { $link = model('Link'); $id = input('id', '', 'trim,intval'); @@ -85,7 +97,9 @@ class Link extends Admin { } } - //删除 + /** + * @title 删除链接 + */ public function delete() { $id = $this->getArrayParam('id'); if (empty($id)) { diff --git a/application/admin/controller/Menu.php b/application/admin/controller/Menu.php index c64a91b2..424d6149 100644 --- a/application/admin/controller/Menu.php +++ b/application/admin/controller/Menu.php @@ -10,12 +10,19 @@ namespace app\admin\controller; use app\common\controller\Admin; + +/** + * @title 菜单管理 + */ class Menu extends Admin { public function _initialize() { parent::_initialize(); } + /** + * @title 菜单列表 + */ public function index() { $map = array(); $title = trim(input('get.title')); @@ -34,7 +41,9 @@ class Menu extends Admin { return $this->fetch(); } - /* 单字段编辑 */ + /** + * @title 编辑菜单字段 + */ public function editable($name = null, $value = null, $pk = null) { if ($name && ($value != null || $value != '') && $pk) { db('Menu')->where(array('id' => $pk))->setField($name, $value); @@ -42,7 +51,7 @@ class Menu extends Admin { } /** - * 新增菜单 + * @title 新增菜单 * @author yangweijie */ public function add() { @@ -76,7 +85,7 @@ class Menu extends Admin { } /** - * 编辑配置 + * @title 编辑配置 * @author yangweijie */ public function edit($id = 0) { @@ -111,7 +120,7 @@ class Menu extends Admin { } /** - * 删除后台菜单 + * @title 删除菜单 * @author yangweijie */ public function del() { @@ -213,7 +222,7 @@ class Menu extends Admin { } /** - * 菜单排序 + * @title 菜单排序 * @author huajie */ public function sort() { diff --git a/application/admin/controller/Model.php b/application/admin/controller/Model.php index 72834a69..0b86e51d 100644 --- a/application/admin/controller/Model.php +++ b/application/admin/controller/Model.php @@ -10,6 +10,9 @@ namespace app\admin\controller; use app\common\controller\Admin; +/** + * @title 模型管理 + */ class Model extends Admin { public function _initialize() { @@ -19,7 +22,7 @@ class Model extends Admin { } /** - * 模型管理首页 + * @title 模型列表 * @author huajie */ public function index() { @@ -44,7 +47,7 @@ class Model extends Admin { } /** - * 新增页面初始化 + * @title 新增模型 * @author huajie */ public function add(\think\Request $request) { @@ -64,7 +67,7 @@ class Model extends Admin { } /** - * 编辑页面初始化 + * @title 编辑模型 * @author molong */ public function edit(\think\Request $request) { @@ -106,7 +109,7 @@ class Model extends Admin { } /** - * 删除一条数据 + * @title 删除模型 * @author huajie */ public function del() { @@ -118,10 +121,6 @@ class Model extends Admin { } } - /** - * 更新一条数据 - * @author huajie - */ public function update() { $res = \think\Loader::model('Model')->change(); if ($res['status']) { @@ -132,7 +131,7 @@ class Model extends Admin { } /** - * 更新数据 + * @title 更新数据 * @author colin */ public function status(\think\Request $request) { diff --git a/application/admin/controller/Seo.php b/application/admin/controller/Seo.php index 11c409ed..e49995c6 100644 --- a/application/admin/controller/Seo.php +++ b/application/admin/controller/Seo.php @@ -10,6 +10,9 @@ namespace app\admin\controller; use app\common\controller\Admin; +/** + * @title SEO管理 + */ class Seo extends Admin { protected $seo; @@ -21,6 +24,9 @@ class Seo extends Admin { $this->rewrite = model('Rewrite'); } + /** + * @title SEO列表 + */ public function index($page = 1, $r = 20) { //读取规则列表 $map = array('status' => array('EGT', 0)); @@ -38,6 +44,9 @@ class Seo extends Admin { return $this->fetch(); } + /** + * @title 添加SEO + */ public function add() { if ($this->request->isPost()) { $data = $this->request->post(); @@ -57,6 +66,9 @@ class Seo extends Admin { } } + /** + * @title 编辑SEO + */ public function edit($id = null) { if ($this->request->isPost()) { $data = $this->request->post(); @@ -79,6 +91,9 @@ class Seo extends Admin { } } + /** + * @title 删除SEO + */ public function del() { $id = $this->getArrayParam('id'); if (empty($id)) { @@ -92,6 +107,9 @@ class Seo extends Admin { } } + /** + * @title 伪静态列表 + */ public function rewrite() { $list = db('Rewrite')->paginate(10); @@ -104,6 +122,9 @@ class Seo extends Admin { return $this->fetch(); } + /** + * @title 添加静态规则 + */ public function addrewrite() { if ($this->request->isPost()) { $result = model('Rewrite')->change(); @@ -122,6 +143,9 @@ class Seo extends Admin { } } + /** + * @title 编辑静态规则 + */ public function editrewrite() { if ($this->request->isPost()) { $result = model('Rewrite')->change(); @@ -143,6 +167,9 @@ class Seo extends Admin { } } + /** + * @title 删除静态规则 + */ public function delrewrite() { $id = $this->getArrayParam('id'); if (empty($id)) { diff --git a/application/admin/controller/User.php b/application/admin/controller/User.php index 8f45040b..baa6b9a0 100644 --- a/application/admin/controller/User.php +++ b/application/admin/controller/User.php @@ -10,10 +10,13 @@ namespace app\admin\controller; use app\common\controller\Admin; +/** + * @title 用户管理 + */ class User extends Admin { /** - * 用户管理首页 + * @title 用户列表 * @author 麦当苗儿 */ public function index() { @@ -43,7 +46,7 @@ class User extends Admin { } /** - * 添加用户 + * @title 添加用户 * @author colin */ public function add() { @@ -68,7 +71,7 @@ class User extends Admin { } /** - * 修改昵称初始化 + * @title 修改用户 * @author huajie */ public function edit() { @@ -97,7 +100,7 @@ class User extends Admin { } /** - * del + * @title 删除用户 * @author colin */ public function del($id) { @@ -108,6 +111,11 @@ class User extends Admin { return $this->success('删除用户成功!'); } + + /** + * @title 用户授权 + * @author colin + */ public function auth() { $access = model('AuthGroupAccess'); $group = model('AuthGroup'); @@ -150,7 +158,7 @@ class User extends Admin { } /** - * 获取某个用户的信息 + * @title 获取某个用户的信息 * @var uid 针对状态和删除启用 * @var pass 是查询password * @var errormasg 错误提示 @@ -174,7 +182,7 @@ class User extends Admin { } /** - * 修改昵称提交 + * @title 修改昵称 * @author huajie */ public function submitNickname() { @@ -216,7 +224,7 @@ class User extends Admin { } /** - * 修改密码初始化 + * @title 修改密码初始化 * @author huajie */ public function editpwd() { @@ -237,7 +245,7 @@ class User extends Admin { } /** - * 会员状态修改 + * @title 会员状态修改 * @author 朱亚杰 */ public function changeStatus($method = null) {