权限节点的更新
This commit is contained in:
@@ -10,10 +10,14 @@
|
||||
namespace app\admin\controller;
|
||||
use app\common\controller\Admin;
|
||||
|
||||
/**
|
||||
* @title 行为管理
|
||||
* @description 行为管理
|
||||
*/
|
||||
class Action extends Admin {
|
||||
|
||||
/**
|
||||
* 用户行为列表
|
||||
* @title 用户行为列表
|
||||
* @author huajie <banhuajie@163.com>
|
||||
*/
|
||||
public function index() {
|
||||
@@ -37,7 +41,7 @@ class Action extends Admin {
|
||||
}
|
||||
|
||||
/**
|
||||
* 新建用户行为
|
||||
* @title 新建用户行为
|
||||
* @author colin <colin@tensent.cn>
|
||||
*/
|
||||
public function add() {
|
||||
@@ -62,7 +66,7 @@ class Action extends Admin {
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑用户行为
|
||||
* @title 编辑用户行为
|
||||
* @author colin <colin@tensent.cn>
|
||||
*/
|
||||
public function edit($id = null) {
|
||||
@@ -92,7 +96,7 @@ class Action extends Admin {
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除用户行为状态
|
||||
* @title 删除用户行为
|
||||
* @author colin <colin@tensent.cn>
|
||||
*/
|
||||
public function del() {
|
||||
@@ -111,7 +115,7 @@ class Action extends Admin {
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改用户行为状态
|
||||
* @title 修改用户行为状态
|
||||
* @author colin <colin@tensent.cn>
|
||||
*/
|
||||
public function setstatus() {
|
||||
@@ -132,7 +136,7 @@ class Action extends Admin {
|
||||
}
|
||||
|
||||
/**
|
||||
* 行为日志列表
|
||||
* @title 行为日志列表
|
||||
* @author huajie <banhuajie@163.com>
|
||||
*/
|
||||
public function log() {
|
||||
@@ -153,7 +157,7 @@ class Action extends Admin {
|
||||
return $this->fetch();
|
||||
}
|
||||
/**
|
||||
* 查看行为日志
|
||||
* @title 查看行为日志
|
||||
* @author huajie <banhuajie@163.com>
|
||||
*/
|
||||
public function detail($id = 0) {
|
||||
@@ -176,8 +180,9 @@ class Action extends Admin {
|
||||
$this->setMeta('查看行为日志');
|
||||
return $this->fetch();
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除日志
|
||||
* @title 删除日志
|
||||
* @param mixed $id
|
||||
* @author huajie <banhuajie@163.com>
|
||||
*/
|
||||
@@ -195,8 +200,9 @@ class Action extends Admin {
|
||||
return $this->error('删除失败!');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 清空日志
|
||||
* @title 清空日志
|
||||
*/
|
||||
public function clear($id = '') {
|
||||
$res = db('ActionLog')->where('1=1')->delete();
|
||||
|
||||
@@ -10,6 +10,10 @@
|
||||
namespace app\admin\controller;
|
||||
use app\common\controller\Admin;
|
||||
|
||||
/**
|
||||
* @title 广告管理
|
||||
* @description 广告管理
|
||||
*/
|
||||
class Ad extends Admin {
|
||||
|
||||
protected $ad;
|
||||
@@ -20,8 +24,9 @@ class Ad extends Admin {
|
||||
$this->ad = db('Ad');
|
||||
$this->adplace = db('AdPlace');
|
||||
}
|
||||
|
||||
/**
|
||||
* 插件列表
|
||||
* @title 广告位管理
|
||||
*/
|
||||
public function index() {
|
||||
$map = array();
|
||||
@@ -40,7 +45,7 @@ class Ad extends Admin {
|
||||
}
|
||||
|
||||
/**
|
||||
* 广告位添加
|
||||
* @title 广告位添加
|
||||
*/
|
||||
public function add() {
|
||||
$place = model('AdPlace');
|
||||
@@ -61,6 +66,9 @@ class Ad extends Admin {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @title 广告位编辑
|
||||
*/
|
||||
public function edit($id = null) {
|
||||
$place = model('AdPlace');
|
||||
if ($this->request->isPost()) {
|
||||
@@ -85,6 +93,9 @@ class Ad extends Admin {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @title 广告位删除
|
||||
*/
|
||||
public function del() {
|
||||
$id = $this->getArrayParam('id');
|
||||
|
||||
@@ -100,6 +111,9 @@ class Ad extends Admin {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @title 广告列表
|
||||
*/
|
||||
public function lists($id = null) {
|
||||
$map['place_id'] = $id;
|
||||
$order = "id desc";
|
||||
@@ -117,6 +131,9 @@ class Ad extends Admin {
|
||||
return $this->fetch();
|
||||
}
|
||||
|
||||
/**
|
||||
* @title 添加广告
|
||||
*/
|
||||
public function addad($id) {
|
||||
$ad = model('ad');
|
||||
if ($this->request->isPost()) {
|
||||
@@ -138,6 +155,9 @@ class Ad extends Admin {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @title 编辑广告
|
||||
*/
|
||||
public function editad($id = null) {
|
||||
$ad = model('ad');
|
||||
if ($this->request->isPost()) {
|
||||
@@ -162,6 +182,9 @@ class Ad extends Admin {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @title 删除广告
|
||||
*/
|
||||
public function delad() {
|
||||
$id = $this->getArrayParam('id');
|
||||
|
||||
|
||||
@@ -10,6 +10,10 @@
|
||||
namespace app\admin\controller;
|
||||
use app\common\controller\Admin;
|
||||
|
||||
/**
|
||||
* @title 插件管理
|
||||
* @description 插件管理
|
||||
*/
|
||||
class Addons extends Admin {
|
||||
|
||||
protected $addons;
|
||||
@@ -22,7 +26,7 @@ class Addons extends Admin {
|
||||
$this->hooks = db('Hooks');
|
||||
}
|
||||
/**
|
||||
* 插件列表
|
||||
* @title 插件列表
|
||||
*/
|
||||
public function index($refresh = 0) {
|
||||
if ($refresh) {
|
||||
@@ -43,7 +47,9 @@ class Addons extends Admin {
|
||||
return $this->fetch();
|
||||
}
|
||||
|
||||
//创建向导首页
|
||||
/**
|
||||
* @title 添加插件
|
||||
*/
|
||||
public function add() {
|
||||
if ($this->request->isPost()) {
|
||||
$data = $this->addons->create();
|
||||
@@ -72,12 +78,8 @@ class Addons extends Admin {
|
||||
}
|
||||
}
|
||||
|
||||
//预览
|
||||
public function preview($output = true) {
|
||||
}
|
||||
|
||||
/**
|
||||
* 安装插件
|
||||
* @title 安装插件
|
||||
*/
|
||||
public function install() {
|
||||
$addon_name = input('addon_name', '', 'trim,ucfirst');
|
||||
@@ -107,7 +109,7 @@ class Addons extends Admin {
|
||||
}
|
||||
|
||||
/**
|
||||
* 卸载插件
|
||||
* @title 卸载插件
|
||||
*/
|
||||
public function uninstall($id) {
|
||||
$result = $this->addons->uninstall($id);
|
||||
@@ -119,7 +121,7 @@ class Addons extends Admin {
|
||||
}
|
||||
|
||||
/**
|
||||
* 启用插件
|
||||
* @title 启用插件
|
||||
*/
|
||||
public function enable() {
|
||||
$id = input('id');
|
||||
@@ -134,7 +136,7 @@ class Addons extends Admin {
|
||||
}
|
||||
|
||||
/**
|
||||
* 禁用插件
|
||||
* @title 禁用插件
|
||||
*/
|
||||
public function disable() {
|
||||
$id = input('id');
|
||||
@@ -149,7 +151,7 @@ class Addons extends Admin {
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置插件页面
|
||||
* @title 设置插件页面
|
||||
*/
|
||||
public function config() {
|
||||
if ($this->request->isPost()) {
|
||||
@@ -177,6 +179,7 @@ class Addons extends Admin {
|
||||
}
|
||||
|
||||
/**
|
||||
* @title 检测插件
|
||||
* 获取插件所需的钩子是否存在,没有则新增
|
||||
* @param string $str 钩子名称
|
||||
* @param string $addons 插件名称
|
||||
@@ -199,7 +202,7 @@ class Addons extends Admin {
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除钩子
|
||||
* @title 删除钩子
|
||||
* @param string $hook 钩子名称
|
||||
*/
|
||||
public function deleteHook($hook) {
|
||||
@@ -212,7 +215,7 @@ class Addons extends Admin {
|
||||
}
|
||||
|
||||
/**
|
||||
* 钩子列表
|
||||
* @title 钩子列表
|
||||
*/
|
||||
public function hooks() {
|
||||
|
||||
@@ -234,6 +237,9 @@ class Addons extends Admin {
|
||||
return $this->fetch();
|
||||
}
|
||||
|
||||
/**
|
||||
* @title 添加钩子
|
||||
*/
|
||||
public function addhook() {
|
||||
$hooks = model('Hooks');
|
||||
if ($this->request->isPost()) {
|
||||
@@ -254,7 +260,9 @@ class Addons extends Admin {
|
||||
}
|
||||
}
|
||||
|
||||
//钩子出编辑挂载插件页面
|
||||
/**
|
||||
* @title 编辑钩子
|
||||
*/
|
||||
public function edithook($id) {
|
||||
$hooks = model('Hooks');
|
||||
if ($this->request->isPost()) {
|
||||
@@ -277,7 +285,9 @@ class Addons extends Admin {
|
||||
}
|
||||
}
|
||||
|
||||
//超级管理员删除钩子
|
||||
/**
|
||||
* @title 删除钩子
|
||||
*/
|
||||
public function delhook() {
|
||||
$id = $this->getArrayParam('id');
|
||||
$map['id'] = array('IN', $id);
|
||||
@@ -289,6 +299,9 @@ class Addons extends Admin {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @title 更新钩子
|
||||
*/
|
||||
public function updateHook() {
|
||||
$hookModel = D('Hooks');
|
||||
$data = $hookModel->create();
|
||||
|
||||
@@ -10,6 +10,10 @@
|
||||
namespace app\admin\controller;
|
||||
use app\common\controller\Admin;
|
||||
|
||||
/**
|
||||
* @title 字段管理
|
||||
* @description 字段管理
|
||||
*/
|
||||
class Attribute extends Admin {
|
||||
|
||||
//保存的Model句柄
|
||||
@@ -42,7 +46,7 @@ class Attribute extends Admin {
|
||||
}
|
||||
|
||||
/**
|
||||
* index方法
|
||||
* @title 字段列表
|
||||
* @author colin <colin@tensent.cn>
|
||||
*/
|
||||
public function index($model_id = null) {
|
||||
@@ -64,7 +68,7 @@ class Attribute extends Admin {
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建字段
|
||||
* @title 创建字段
|
||||
* @author colin <colin@tensent.cn>
|
||||
*/
|
||||
public function add($model_id = '') {
|
||||
@@ -87,7 +91,7 @@ class Attribute extends Admin {
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑字段方法
|
||||
* @title 编辑字段
|
||||
* @author colin <colin@tensent.cn>
|
||||
*/
|
||||
public function edit($id = '', $model_id = '') {
|
||||
@@ -111,7 +115,7 @@ class Attribute extends Admin {
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除字段信息
|
||||
* @title 删除字段
|
||||
* @var delattr 是否删除字段表里的字段
|
||||
* @author colin <colin@tensent.cn>
|
||||
*/
|
||||
|
||||
@@ -10,6 +10,10 @@
|
||||
namespace app\admin\controller;
|
||||
use app\common\controller\Admin;
|
||||
|
||||
/**
|
||||
* @title 分类管理
|
||||
* @description 分类管理
|
||||
*/
|
||||
class Category extends Admin {
|
||||
|
||||
public function _initialize() {
|
||||
@@ -17,6 +21,9 @@ class Category extends Admin {
|
||||
$this->getContentMenu();
|
||||
}
|
||||
|
||||
/**
|
||||
* @title 分类列表
|
||||
*/
|
||||
public function index($model_id = '') {
|
||||
$map = array('status' => array('gt', -1));
|
||||
if ($model_id) {
|
||||
@@ -38,14 +45,18 @@ class Category extends Admin {
|
||||
return $this->fetch();
|
||||
}
|
||||
|
||||
/* 单字段编辑 */
|
||||
/**
|
||||
* @title 编辑字段
|
||||
*/
|
||||
public function editable($name = null, $value = null, $pk = null) {
|
||||
if ($name && ($value != null || $value != '') && $pk) {
|
||||
db('Category')->where(array('id' => $pk))->setField($name, $value);
|
||||
}
|
||||
}
|
||||
|
||||
/* 编辑分类 */
|
||||
/**
|
||||
* @title 编辑分类
|
||||
*/
|
||||
public function edit($id = null, $pid = 0) {
|
||||
if ($this->request->isPost()) {
|
||||
$category = model('Category');
|
||||
@@ -81,7 +92,10 @@ class Category extends Admin {
|
||||
return $this->fetch();
|
||||
}
|
||||
}
|
||||
/* 新增分类 */
|
||||
|
||||
/**
|
||||
* @title 添加分类
|
||||
*/
|
||||
public function add($pid = 0) {
|
||||
$Category = model('Category');
|
||||
|
||||
@@ -116,7 +130,7 @@ class Category extends Admin {
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 删除一个分类
|
||||
* @title 删除分类
|
||||
* @author huajie <banhuajie@163.com>
|
||||
*/
|
||||
public function remove($id) {
|
||||
@@ -181,8 +195,9 @@ class Category extends Admin {
|
||||
$this->setMeta($operate . '分类');
|
||||
return $this->fetch();
|
||||
}
|
||||
|
||||
/**
|
||||
* 移动分类
|
||||
* @title 移动分类
|
||||
* @author huajie <banhuajie@163.com>
|
||||
*/
|
||||
public function move() {
|
||||
@@ -195,8 +210,9 @@ class Category extends Admin {
|
||||
return $this->error('分类移动失败!');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 合并分类
|
||||
* @title 合并分类
|
||||
* @author huajie <banhuajie@163.com>
|
||||
*/
|
||||
public function merge() {
|
||||
@@ -232,6 +248,10 @@ class Category extends Admin {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @title 修改状态
|
||||
* @author huajie <banhuajie@163.com>
|
||||
*/
|
||||
public function status() {
|
||||
$id = $this->getArrayParam('id');
|
||||
$status = input('status', '0', 'trim,intval');
|
||||
@@ -248,42 +268,46 @@ class Category extends Admin {
|
||||
return $this->error("设置失败!");
|
||||
}
|
||||
}
|
||||
|
||||
public function add_channel() {
|
||||
if ($this->request->isPost()) {
|
||||
$Channel = model('Channel');
|
||||
$data = $this->request->param();
|
||||
if ($data) {
|
||||
$id = $Channel->save($data);
|
||||
if ($id) {
|
||||
$map['id'] = array('IN', $data['mid']);
|
||||
$result = db('Category')->where($map)->setField('ismenu',$Channel->id);
|
||||
return $this->success('生成成功',url('index'));
|
||||
//记录行为
|
||||
action_log('update_channel', 'channel', $id, session('user_auth.uid'));
|
||||
} else {
|
||||
return $this->error('生成失败');
|
||||
}
|
||||
} else {
|
||||
$this->error($Channel->getError());
|
||||
}
|
||||
} else {
|
||||
$data = $this->request->param();
|
||||
$modelname = db('Model')->where( array('id' => $data['model_id']) )->field('id,name')->find();
|
||||
$data['url'] = $modelname['name'].'/list/'.$data['mid'];
|
||||
$pid = input('pid', 0);
|
||||
//获取父导航
|
||||
if (!empty($pid)) {
|
||||
$parent = db('Channel')->where(array('id' => $pid))->field('title')->find();
|
||||
$this->assign('parent', $parent);
|
||||
}
|
||||
$pnav = db('Channel')->where(array('pid' => '0'))->select();
|
||||
$this->assign('pnav', $pnav);
|
||||
$this->assign('pid', $pid);
|
||||
$this->assign('info', $data);
|
||||
$this->assign('data',null );
|
||||
$this->setMeta('生成导航');
|
||||
return $this->fetch('edit_channel');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @title 生成频道
|
||||
* @author huajie <banhuajie@163.com>
|
||||
*/
|
||||
public function add_channel() {
|
||||
if ($this->request->isPost()) {
|
||||
$Channel = model('Channel');
|
||||
$data = $this->request->param();
|
||||
if ($data) {
|
||||
$id = $Channel->save($data);
|
||||
if ($id) {
|
||||
$map['id'] = array('IN', $data['mid']);
|
||||
$result = db('Category')->where($map)->setField('ismenu',$Channel->id);
|
||||
return $this->success('生成成功',url('index'));
|
||||
//记录行为
|
||||
action_log('update_channel', 'channel', $id, session('user_auth.uid'));
|
||||
} else {
|
||||
return $this->error('生成失败');
|
||||
}
|
||||
} else {
|
||||
$this->error($Channel->getError());
|
||||
}
|
||||
} else {
|
||||
$data = $this->request->param();
|
||||
$modelname = db('Model')->where( array('id' => $data['model_id']) )->field('id,name')->find();
|
||||
$data['url'] = $modelname['name'].'/list/'.$data['mid'];
|
||||
$pid = input('pid', 0);
|
||||
//获取父导航
|
||||
if (!empty($pid)) {
|
||||
$parent = db('Channel')->where(array('id' => $pid))->field('title')->find();
|
||||
$this->assign('parent', $parent);
|
||||
}
|
||||
$pnav = db('Channel')->where(array('pid' => '0'))->select();
|
||||
$this->assign('pnav', $pnav);
|
||||
$this->assign('pid', $pid);
|
||||
$this->assign('info', $data);
|
||||
$this->assign('data',null );
|
||||
$this->setMeta('生成导航');
|
||||
return $this->fetch('edit_channel');
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -10,12 +10,19 @@
|
||||
namespace app\admin\controller;
|
||||
use app\common\controller\Admin;
|
||||
|
||||
/**
|
||||
* @title 频道管理
|
||||
* @description 频道管理
|
||||
*/
|
||||
class Channel extends Admin {
|
||||
|
||||
public function _initialize() {
|
||||
parent::_initialize();
|
||||
}
|
||||
|
||||
/**
|
||||
* @title 频道列表
|
||||
*/
|
||||
public function index($type = 0) {
|
||||
/* 获取频道列表 */
|
||||
//$map = array('status' => array('gt', -1), 'pid'=>$pid);
|
||||
@@ -41,7 +48,9 @@ class Channel extends Admin {
|
||||
return $this->fetch();
|
||||
}
|
||||
|
||||
/* 单字段编辑 */
|
||||
/**
|
||||
* @title 单字段编辑
|
||||
*/
|
||||
public function editable($name = null, $value = null, $pk = null) {
|
||||
if ($name && ($value != null || $value != '') && $pk) {
|
||||
model('Channel')->where(array('id' => $pk))->setField($name, $value);
|
||||
@@ -49,7 +58,7 @@ class Channel extends Admin {
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加频道
|
||||
* @title 添加频道
|
||||
* @author 麦当苗儿 <zuojiazi@vip.qq.com>
|
||||
*/
|
||||
public function add() {
|
||||
@@ -85,7 +94,7 @@ class Channel extends Admin {
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 编辑频道
|
||||
* @title 编辑频道
|
||||
* @author 麦当苗儿 <zuojiazi@vip.qq.com>
|
||||
*/
|
||||
public function edit($id = 0) {
|
||||
@@ -128,7 +137,7 @@ class Channel extends Admin {
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 删除频道
|
||||
* @title 删除频道
|
||||
* @author 麦当苗儿 <zuojiazi@vip.qq.com>
|
||||
*/
|
||||
public function del() {
|
||||
@@ -151,7 +160,7 @@ class Channel extends Admin {
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 导航排序
|
||||
* @title 导航排序
|
||||
* @author huajie <banhuajie@163.com>
|
||||
*/
|
||||
public function sort() {
|
||||
@@ -188,6 +197,9 @@ class Channel extends Admin {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @title 设置状态
|
||||
*/
|
||||
public function setStatus() {
|
||||
$id = array_unique((array) input('ids', 0));
|
||||
$status = input('status', '0', 'trim');
|
||||
|
||||
@@ -10,6 +10,9 @@
|
||||
namespace app\admin\controller;
|
||||
use app\common\controller\Admin;
|
||||
|
||||
/**
|
||||
* @title 客户端管理
|
||||
*/
|
||||
class Client extends Admin {
|
||||
|
||||
public function _initialize() {
|
||||
@@ -17,7 +20,9 @@ class Client extends Admin {
|
||||
$this->model = model('Client');
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @title 客户端列表
|
||||
*/
|
||||
public function index(){
|
||||
$list = $this->model->paginate(25, false, array(
|
||||
'query' => $this->request->param()
|
||||
@@ -31,6 +36,9 @@ class Client extends Admin {
|
||||
return $this->fetch();
|
||||
}
|
||||
|
||||
/**
|
||||
* @title 添加客户端
|
||||
*/
|
||||
public function add(\think\Request $request){
|
||||
if ($this->request->isPost()) {
|
||||
$data = $request->param();
|
||||
@@ -52,6 +60,9 @@ class Client extends Admin {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @title 编辑客户端
|
||||
*/
|
||||
public function edit(\think\Request $request){
|
||||
if ($this->request->isPost()) {
|
||||
$data = $request->param();
|
||||
@@ -72,6 +83,9 @@ class Client extends Admin {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @title 删除客户端
|
||||
*/
|
||||
public function del(\think\Request $request){
|
||||
|
||||
}
|
||||
|
||||
@@ -10,6 +10,9 @@
|
||||
namespace app\admin\controller;
|
||||
use app\common\controller\Admin;
|
||||
|
||||
/**
|
||||
* @title 配置管理
|
||||
*/
|
||||
class Config extends Admin {
|
||||
|
||||
public function _initialize() {
|
||||
@@ -18,7 +21,7 @@ class Config extends Admin {
|
||||
}
|
||||
|
||||
/**
|
||||
* 配置管理
|
||||
* @title 配置管理
|
||||
* @author 麦当苗儿 <zuojiazi@vip.qq.com>
|
||||
*/
|
||||
public function index() {
|
||||
@@ -53,6 +56,9 @@ class Config extends Admin {
|
||||
return $this->fetch();
|
||||
}
|
||||
|
||||
/**
|
||||
* @title 信息配置
|
||||
*/
|
||||
public function group($id = 1) {
|
||||
if ($this->request->isPost()) {
|
||||
$config = $this->request->post('config/a');
|
||||
@@ -76,7 +82,7 @@ class Config extends Admin {
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增配置
|
||||
* @title 新增配置
|
||||
* @author 麦当苗儿 <zuojiazi@vip.qq.com>
|
||||
*/
|
||||
public function add() {
|
||||
@@ -104,7 +110,7 @@ class Config extends Admin {
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑配置
|
||||
* @title 编辑配置
|
||||
* @author 麦当苗儿 <zuojiazi@vip.qq.com>
|
||||
*/
|
||||
public function edit($id = 0) {
|
||||
@@ -138,7 +144,7 @@ class Config extends Admin {
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 批量保存配置
|
||||
* @title 批量保存配置
|
||||
* @author 麦当苗儿 <zuojiazi@vip.qq.com>
|
||||
*/
|
||||
public function save($config) {
|
||||
@@ -152,8 +158,9 @@ class Config extends Admin {
|
||||
cache('db_config_data', null);
|
||||
return $this->success('保存成功!');
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除配置
|
||||
* @title 删除配置
|
||||
* @author 麦当苗儿 <zuojiazi@vip.qq.com>
|
||||
*/
|
||||
public function del() {
|
||||
@@ -175,7 +182,7 @@ class Config extends Admin {
|
||||
}
|
||||
|
||||
/**
|
||||
* 配置排序
|
||||
* @title 配置排序
|
||||
* @author huajie <banhuajie@163.com>
|
||||
*/
|
||||
public function sort() {
|
||||
@@ -209,7 +216,9 @@ class Config extends Admin {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @title 主题选择
|
||||
*/
|
||||
public function themes() {
|
||||
$list = $this->model->getThemesList();
|
||||
$pc = config('pc_themes');
|
||||
@@ -226,7 +235,7 @@ class Config extends Admin {
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置主题
|
||||
* @title 设置主题
|
||||
* @return json
|
||||
*/
|
||||
public function setthemes($name, $id){
|
||||
|
||||
@@ -130,8 +130,8 @@ class Group extends Admin {
|
||||
|
||||
//根据菜单更新节点
|
||||
public function upnode($type) {
|
||||
$rule = model('Menu')->getAuthNodes($type);
|
||||
$reuslt = $this->rule->uprule($rule, $type);
|
||||
//$rule = model('Menu')->getAuthNodes($type);
|
||||
$reuslt = $this->rule->uprule($type);
|
||||
return $this->success("更新成功!");
|
||||
}
|
||||
|
||||
|
||||
@@ -11,13 +11,29 @@ namespace app\admin\controller;
|
||||
|
||||
use app\common\controller\Admin;
|
||||
|
||||
/**
|
||||
* @title 首页
|
||||
* @description 后台首页
|
||||
*/
|
||||
class Index extends Admin {
|
||||
|
||||
/**
|
||||
* @title 后台首页
|
||||
* @return html
|
||||
*/
|
||||
public function index() {
|
||||
$methods = model('AuthRule')->updaterule('admin');
|
||||
dump($methods);
|
||||
exit();
|
||||
|
||||
$this->setMeta('后台首页');
|
||||
return $this->fetch();
|
||||
}
|
||||
|
||||
/**
|
||||
* @title 用户登录
|
||||
* @return html
|
||||
*/
|
||||
public function login($username = '', $password = '', $verify = '') {
|
||||
if ($this->request->isPost()) {
|
||||
if (!$username || !$password) {
|
||||
@@ -49,10 +65,10 @@ class Index extends Admin {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* title : 后台退出
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* @title 后台退出
|
||||
* @return html
|
||||
*/
|
||||
public function logout() {
|
||||
$user = model('Member');
|
||||
$user->logout();
|
||||
@@ -60,10 +76,10 @@ class Index extends Admin {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* title : 清除缓存
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* @title 清除缓存
|
||||
* @return html
|
||||
*/
|
||||
public function clear() {
|
||||
if ($this->request->isPost()) {
|
||||
$clear = input('post.clear/a', array());
|
||||
|
||||
Reference in New Issue
Block a user