后台文件注释增加,为做权限节点自动更新
This commit is contained in:
@@ -1,7 +0,0 @@
|
|||||||
<?php
|
|
||||||
namespace app\admin\controller;
|
|
||||||
|
|
||||||
class Goods
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -10,8 +10,15 @@
|
|||||||
namespace app\admin\controller;
|
namespace app\admin\controller;
|
||||||
use app\common\controller\Admin;
|
use app\common\controller\Admin;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @title 友情链接
|
||||||
|
* @description 友情链接
|
||||||
|
*/
|
||||||
class Link extends Admin {
|
class Link extends Admin {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @title 链接列表
|
||||||
|
*/
|
||||||
public function index() {
|
public function index() {
|
||||||
$map = array();
|
$map = array();
|
||||||
|
|
||||||
@@ -29,7 +36,9 @@ class Link extends Admin {
|
|||||||
return $this->fetch();
|
return $this->fetch();
|
||||||
}
|
}
|
||||||
|
|
||||||
//添加
|
/**
|
||||||
|
* @title 添加链接
|
||||||
|
*/
|
||||||
public function add() {
|
public function add() {
|
||||||
$link = model('Link');
|
$link = model('Link');
|
||||||
if ($this->request->isPost()) {
|
if ($this->request->isPost()) {
|
||||||
@@ -55,7 +64,10 @@ class Link extends Admin {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//修改
|
|
||||||
|
/**
|
||||||
|
* @title 修改链接
|
||||||
|
*/
|
||||||
public function edit() {
|
public function edit() {
|
||||||
$link = model('Link');
|
$link = model('Link');
|
||||||
$id = input('id', '', 'trim,intval');
|
$id = input('id', '', 'trim,intval');
|
||||||
@@ -85,7 +97,9 @@ class Link extends Admin {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//删除
|
/**
|
||||||
|
* @title 删除链接
|
||||||
|
*/
|
||||||
public function delete() {
|
public function delete() {
|
||||||
$id = $this->getArrayParam('id');
|
$id = $this->getArrayParam('id');
|
||||||
if (empty($id)) {
|
if (empty($id)) {
|
||||||
|
|||||||
@@ -10,12 +10,19 @@
|
|||||||
namespace app\admin\controller;
|
namespace app\admin\controller;
|
||||||
use app\common\controller\Admin;
|
use app\common\controller\Admin;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @title 菜单管理
|
||||||
|
*/
|
||||||
class Menu extends Admin {
|
class Menu extends Admin {
|
||||||
|
|
||||||
public function _initialize() {
|
public function _initialize() {
|
||||||
parent::_initialize();
|
parent::_initialize();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @title 菜单列表
|
||||||
|
*/
|
||||||
public function index() {
|
public function index() {
|
||||||
$map = array();
|
$map = array();
|
||||||
$title = trim(input('get.title'));
|
$title = trim(input('get.title'));
|
||||||
@@ -34,7 +41,9 @@ class Menu extends Admin {
|
|||||||
return $this->fetch();
|
return $this->fetch();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 单字段编辑 */
|
/**
|
||||||
|
* @title 编辑菜单字段
|
||||||
|
*/
|
||||||
public function editable($name = null, $value = null, $pk = null) {
|
public function editable($name = null, $value = null, $pk = null) {
|
||||||
if ($name && ($value != null || $value != '') && $pk) {
|
if ($name && ($value != null || $value != '') && $pk) {
|
||||||
db('Menu')->where(array('id' => $pk))->setField($name, $value);
|
db('Menu')->where(array('id' => $pk))->setField($name, $value);
|
||||||
@@ -42,7 +51,7 @@ class Menu extends Admin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增菜单
|
* @title 新增菜单
|
||||||
* @author yangweijie <yangweijiester@gmail.com>
|
* @author yangweijie <yangweijiester@gmail.com>
|
||||||
*/
|
*/
|
||||||
public function add() {
|
public function add() {
|
||||||
@@ -76,7 +85,7 @@ class Menu extends Admin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 编辑配置
|
* @title 编辑配置
|
||||||
* @author yangweijie <yangweijiester@gmail.com>
|
* @author yangweijie <yangweijiester@gmail.com>
|
||||||
*/
|
*/
|
||||||
public function edit($id = 0) {
|
public function edit($id = 0) {
|
||||||
@@ -111,7 +120,7 @@ class Menu extends Admin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除后台菜单
|
* @title 删除菜单
|
||||||
* @author yangweijie <yangweijiester@gmail.com>
|
* @author yangweijie <yangweijiester@gmail.com>
|
||||||
*/
|
*/
|
||||||
public function del() {
|
public function del() {
|
||||||
@@ -213,7 +222,7 @@ class Menu extends Admin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 菜单排序
|
* @title 菜单排序
|
||||||
* @author huajie <banhuajie@163.com>
|
* @author huajie <banhuajie@163.com>
|
||||||
*/
|
*/
|
||||||
public function sort() {
|
public function sort() {
|
||||||
|
|||||||
@@ -10,6 +10,9 @@
|
|||||||
namespace app\admin\controller;
|
namespace app\admin\controller;
|
||||||
use app\common\controller\Admin;
|
use app\common\controller\Admin;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @title 模型管理
|
||||||
|
*/
|
||||||
class Model extends Admin {
|
class Model extends Admin {
|
||||||
|
|
||||||
public function _initialize() {
|
public function _initialize() {
|
||||||
@@ -19,7 +22,7 @@ class Model extends Admin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 模型管理首页
|
* @title 模型列表
|
||||||
* @author huajie <banhuajie@163.com>
|
* @author huajie <banhuajie@163.com>
|
||||||
*/
|
*/
|
||||||
public function index() {
|
public function index() {
|
||||||
@@ -44,7 +47,7 @@ class Model extends Admin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增页面初始化
|
* @title 新增模型
|
||||||
* @author huajie <banhuajie@163.com>
|
* @author huajie <banhuajie@163.com>
|
||||||
*/
|
*/
|
||||||
public function add(\think\Request $request) {
|
public function add(\think\Request $request) {
|
||||||
@@ -64,7 +67,7 @@ class Model extends Admin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 编辑页面初始化
|
* @title 编辑模型
|
||||||
* @author molong <molong@tensent.cn>
|
* @author molong <molong@tensent.cn>
|
||||||
*/
|
*/
|
||||||
public function edit(\think\Request $request) {
|
public function edit(\think\Request $request) {
|
||||||
@@ -106,7 +109,7 @@ class Model extends Admin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除一条数据
|
* @title 删除模型
|
||||||
* @author huajie <banhuajie@163.com>
|
* @author huajie <banhuajie@163.com>
|
||||||
*/
|
*/
|
||||||
public function del() {
|
public function del() {
|
||||||
@@ -118,10 +121,6 @@ class Model extends Admin {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 更新一条数据
|
|
||||||
* @author huajie <banhuajie@163.com>
|
|
||||||
*/
|
|
||||||
public function update() {
|
public function update() {
|
||||||
$res = \think\Loader::model('Model')->change();
|
$res = \think\Loader::model('Model')->change();
|
||||||
if ($res['status']) {
|
if ($res['status']) {
|
||||||
@@ -132,7 +131,7 @@ class Model extends Admin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 更新数据
|
* @title 更新数据
|
||||||
* @author colin <colin@tensent.cn>
|
* @author colin <colin@tensent.cn>
|
||||||
*/
|
*/
|
||||||
public function status(\think\Request $request) {
|
public function status(\think\Request $request) {
|
||||||
|
|||||||
@@ -10,6 +10,9 @@
|
|||||||
namespace app\admin\controller;
|
namespace app\admin\controller;
|
||||||
use app\common\controller\Admin;
|
use app\common\controller\Admin;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @title SEO管理
|
||||||
|
*/
|
||||||
class Seo extends Admin {
|
class Seo extends Admin {
|
||||||
|
|
||||||
protected $seo;
|
protected $seo;
|
||||||
@@ -21,6 +24,9 @@ class Seo extends Admin {
|
|||||||
$this->rewrite = model('Rewrite');
|
$this->rewrite = model('Rewrite');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @title SEO列表
|
||||||
|
*/
|
||||||
public function index($page = 1, $r = 20) {
|
public function index($page = 1, $r = 20) {
|
||||||
//读取规则列表
|
//读取规则列表
|
||||||
$map = array('status' => array('EGT', 0));
|
$map = array('status' => array('EGT', 0));
|
||||||
@@ -38,6 +44,9 @@ class Seo extends Admin {
|
|||||||
return $this->fetch();
|
return $this->fetch();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @title 添加SEO
|
||||||
|
*/
|
||||||
public function add() {
|
public function add() {
|
||||||
if ($this->request->isPost()) {
|
if ($this->request->isPost()) {
|
||||||
$data = $this->request->post();
|
$data = $this->request->post();
|
||||||
@@ -57,6 +66,9 @@ class Seo extends Admin {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @title 编辑SEO
|
||||||
|
*/
|
||||||
public function edit($id = null) {
|
public function edit($id = null) {
|
||||||
if ($this->request->isPost()) {
|
if ($this->request->isPost()) {
|
||||||
$data = $this->request->post();
|
$data = $this->request->post();
|
||||||
@@ -79,6 +91,9 @@ class Seo extends Admin {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @title 删除SEO
|
||||||
|
*/
|
||||||
public function del() {
|
public function del() {
|
||||||
$id = $this->getArrayParam('id');
|
$id = $this->getArrayParam('id');
|
||||||
if (empty($id)) {
|
if (empty($id)) {
|
||||||
@@ -92,6 +107,9 @@ class Seo extends Admin {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @title 伪静态列表
|
||||||
|
*/
|
||||||
public function rewrite() {
|
public function rewrite() {
|
||||||
$list = db('Rewrite')->paginate(10);
|
$list = db('Rewrite')->paginate(10);
|
||||||
|
|
||||||
@@ -104,6 +122,9 @@ class Seo extends Admin {
|
|||||||
return $this->fetch();
|
return $this->fetch();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @title 添加静态规则
|
||||||
|
*/
|
||||||
public function addrewrite() {
|
public function addrewrite() {
|
||||||
if ($this->request->isPost()) {
|
if ($this->request->isPost()) {
|
||||||
$result = model('Rewrite')->change();
|
$result = model('Rewrite')->change();
|
||||||
@@ -122,6 +143,9 @@ class Seo extends Admin {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @title 编辑静态规则
|
||||||
|
*/
|
||||||
public function editrewrite() {
|
public function editrewrite() {
|
||||||
if ($this->request->isPost()) {
|
if ($this->request->isPost()) {
|
||||||
$result = model('Rewrite')->change();
|
$result = model('Rewrite')->change();
|
||||||
@@ -143,6 +167,9 @@ class Seo extends Admin {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @title 删除静态规则
|
||||||
|
*/
|
||||||
public function delrewrite() {
|
public function delrewrite() {
|
||||||
$id = $this->getArrayParam('id');
|
$id = $this->getArrayParam('id');
|
||||||
if (empty($id)) {
|
if (empty($id)) {
|
||||||
|
|||||||
@@ -10,10 +10,13 @@
|
|||||||
namespace app\admin\controller;
|
namespace app\admin\controller;
|
||||||
use app\common\controller\Admin;
|
use app\common\controller\Admin;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @title 用户管理
|
||||||
|
*/
|
||||||
class User extends Admin {
|
class User extends Admin {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 用户管理首页
|
* @title 用户列表
|
||||||
* @author 麦当苗儿 <zuojiazi@vip.qq.com>
|
* @author 麦当苗儿 <zuojiazi@vip.qq.com>
|
||||||
*/
|
*/
|
||||||
public function index() {
|
public function index() {
|
||||||
@@ -43,7 +46,7 @@ class User extends Admin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 添加用户
|
* @title 添加用户
|
||||||
* @author colin <molong@tensent.cn>
|
* @author colin <molong@tensent.cn>
|
||||||
*/
|
*/
|
||||||
public function add() {
|
public function add() {
|
||||||
@@ -68,7 +71,7 @@ class User extends Admin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改昵称初始化
|
* @title 修改用户
|
||||||
* @author huajie <banhuajie@163.com>
|
* @author huajie <banhuajie@163.com>
|
||||||
*/
|
*/
|
||||||
public function edit() {
|
public function edit() {
|
||||||
@@ -97,7 +100,7 @@ class User extends Admin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* del
|
* @title 删除用户
|
||||||
* @author colin <colin@tensent.cn>
|
* @author colin <colin@tensent.cn>
|
||||||
*/
|
*/
|
||||||
public function del($id) {
|
public function del($id) {
|
||||||
@@ -108,6 +111,11 @@ class User extends Admin {
|
|||||||
return $this->success('删除用户成功!');
|
return $this->success('删除用户成功!');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @title 用户授权
|
||||||
|
* @author colin <colin@tensent.cn>
|
||||||
|
*/
|
||||||
public function auth() {
|
public function auth() {
|
||||||
$access = model('AuthGroupAccess');
|
$access = model('AuthGroupAccess');
|
||||||
$group = model('AuthGroup');
|
$group = model('AuthGroup');
|
||||||
@@ -150,7 +158,7 @@ class User extends Admin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取某个用户的信息
|
* @title 获取某个用户的信息
|
||||||
* @var uid 针对状态和删除启用
|
* @var uid 针对状态和删除启用
|
||||||
* @var pass 是查询password
|
* @var pass 是查询password
|
||||||
* @var errormasg 错误提示
|
* @var errormasg 错误提示
|
||||||
@@ -174,7 +182,7 @@ class User extends Admin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改昵称提交
|
* @title 修改昵称
|
||||||
* @author huajie <banhuajie@163.com>
|
* @author huajie <banhuajie@163.com>
|
||||||
*/
|
*/
|
||||||
public function submitNickname() {
|
public function submitNickname() {
|
||||||
@@ -216,7 +224,7 @@ class User extends Admin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改密码初始化
|
* @title 修改密码初始化
|
||||||
* @author huajie <banhuajie@163.com>
|
* @author huajie <banhuajie@163.com>
|
||||||
*/
|
*/
|
||||||
public function editpwd() {
|
public function editpwd() {
|
||||||
@@ -237,7 +245,7 @@ class User extends Admin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 会员状态修改
|
* @title 会员状态修改
|
||||||
* @author 朱亚杰 <zhuyajie@topthink.net>
|
* @author 朱亚杰 <zhuyajie@topthink.net>
|
||||||
*/
|
*/
|
||||||
public function changeStatus($method = null) {
|
public function changeStatus($method = null) {
|
||||||
|
|||||||
Reference in New Issue
Block a user