后台文件注释增加,为做权限节点自动更新

This commit is contained in:
2018-05-08 15:57:04 +08:00
parent c46a444244
commit 1b11d9e1e8
6 changed files with 82 additions and 32 deletions

View File

@@ -1,7 +0,0 @@
<?php
namespace app\admin\controller;
class Goods
{
}

View File

@@ -10,8 +10,15 @@
namespace app\admin\controller;
use app\common\controller\Admin;
/**
* @title 友情链接
* @description 友情链接
*/
class Link extends Admin {
/**
* @title 链接列表
*/
public function index() {
$map = array();
@@ -29,7 +36,9 @@ class Link extends Admin {
return $this->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)) {

View File

@@ -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 <yangweijiester@gmail.com>
*/
public function add() {
@@ -76,7 +85,7 @@ class Menu extends Admin {
}
/**
* 编辑配置
* @title 编辑配置
* @author yangweijie <yangweijiester@gmail.com>
*/
public function edit($id = 0) {
@@ -111,7 +120,7 @@ class Menu extends Admin {
}
/**
* 删除后台菜单
* @title 删除菜单
* @author yangweijie <yangweijiester@gmail.com>
*/
public function del() {
@@ -213,7 +222,7 @@ class Menu extends Admin {
}
/**
* 菜单排序
* @title 菜单排序
* @author huajie <banhuajie@163.com>
*/
public function sort() {

View File

@@ -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 <banhuajie@163.com>
*/
public function index() {
@@ -44,7 +47,7 @@ class Model extends Admin {
}
/**
* 新增页面初始化
* @title 新增模型
* @author huajie <banhuajie@163.com>
*/
public function add(\think\Request $request) {
@@ -64,7 +67,7 @@ class Model extends Admin {
}
/**
* 编辑页面初始化
* @title 编辑模型
* @author molong <molong@tensent.cn>
*/
public function edit(\think\Request $request) {
@@ -106,7 +109,7 @@ class Model extends Admin {
}
/**
* 删除一条数据
* @title 删除模型
* @author huajie <banhuajie@163.com>
*/
public function del() {
@@ -118,10 +121,6 @@ class Model extends Admin {
}
}
/**
* 更新一条数据
* @author huajie <banhuajie@163.com>
*/
public function update() {
$res = \think\Loader::model('Model')->change();
if ($res['status']) {
@@ -132,7 +131,7 @@ class Model extends Admin {
}
/**
* 更新数据
* @title 更新数据
* @author colin <colin@tensent.cn>
*/
public function status(\think\Request $request) {

View File

@@ -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)) {

View File

@@ -10,10 +10,13 @@
namespace app\admin\controller;
use app\common\controller\Admin;
/**
* @title 用户管理
*/
class User extends Admin {
/**
* 用户管理首页
* @title 用户列表
* @author 麦当苗儿 <zuojiazi@vip.qq.com>
*/
public function index() {
@@ -43,7 +46,7 @@ class User extends Admin {
}
/**
* 添加用户
* @title 添加用户
* @author colin <molong@tensent.cn>
*/
public function add() {
@@ -68,7 +71,7 @@ class User extends Admin {
}
/**
* 修改昵称初始化
* @title 修改用户
* @author huajie <banhuajie@163.com>
*/
public function edit() {
@@ -97,7 +100,7 @@ class User extends Admin {
}
/**
* del
* @title 删除用户
* @author colin <colin@tensent.cn>
*/
public function del($id) {
@@ -108,6 +111,11 @@ class User extends Admin {
return $this->success('删除用户成功!');
}
/**
* @title 用户授权
* @author colin <colin@tensent.cn>
*/
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 <banhuajie@163.com>
*/
public function submitNickname() {
@@ -216,7 +224,7 @@ class User extends Admin {
}
/**
* 修改密码初始化
* @title 修改密码初始化
* @author huajie <banhuajie@163.com>
*/
public function editpwd() {
@@ -237,7 +245,7 @@ class User extends Admin {
}
/**
* 会员状态修改
* @title 会员状态修改
* @author 朱亚杰 <zhuyajie@topthink.net>
*/
public function changeStatus($method = null) {