功能更新
This commit is contained in:
13
README.md
13
README.md
@@ -16,8 +16,9 @@
|
||||
git clone -b 4.0 https://gitee.com/sentcms/sentcms.git sentcms
|
||||
cd sentcms
|
||||
```
|
||||
如果是直接下载压缩包则直接进入解压文件夹,然后执行下面的代码
|
||||
把根目录下的.example.env文件复制一份并命名为.env
|
||||
> 如果是直接下载压缩包则直接进入解压文件夹,然后执行下面的代码
|
||||
|
||||
> 把根目录下的.example.env文件复制一份并命名为.env
|
||||
|
||||
```
|
||||
composer install
|
||||
@@ -81,6 +82,10 @@ composer install
|
||||
|
||||
## 版本列表
|
||||
|
||||
> ……
|
||||
|
||||
> 4.0 正在路上
|
||||
|
||||
> 3.0.170127: https://git.oschina.net/sentcms/sentcms/repository/archive/3.0.170127
|
||||
|
||||
> 3.0.161201:https://git.oschina.net/sentcms/sentcms/repository/archive/3.0.161201
|
||||
@@ -88,7 +93,3 @@ composer install
|
||||
> 3.0.1611:https://git.oschina.net/sentcms/sentcms/repository/archive/3.0.1611
|
||||
|
||||
> 3.0.1609:https://git.oschina.net/sentcms/sentcms/repository/archive/3.0.1609
|
||||
|
||||
> 4.0 正在路上
|
||||
|
||||
> ……
|
||||
@@ -6,8 +6,9 @@
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: molong <molong@tensent.cn> <http://www.tensent.cn>
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\controller\admin;
|
||||
|
||||
use app\model\AdPlace;
|
||||
use app\controller\Admin;
|
||||
|
||||
/**
|
||||
@@ -16,31 +17,19 @@ use app\controller\Admin;
|
||||
*/
|
||||
class Ad extends Admin {
|
||||
|
||||
protected $ad;
|
||||
protected $adplace;
|
||||
|
||||
public function _initialize() {
|
||||
parent::_initialize();
|
||||
$this->ad = db('Ad');
|
||||
$this->adplace = db('AdPlace');
|
||||
}
|
||||
|
||||
/**
|
||||
* @title 广告位管理
|
||||
*/
|
||||
public function index() {
|
||||
$map = array();
|
||||
$map = [];
|
||||
$order = "id desc";
|
||||
|
||||
$list = db('AdPlace')->where($map)->order($order)->paginate(10, false, array(
|
||||
'query' => $this->request->param(),
|
||||
));
|
||||
$data = array(
|
||||
$list = AdPlace::where($map)->order($order)->paginate($this->request->pageConfig);
|
||||
|
||||
$this->data = array(
|
||||
'list' => $list,
|
||||
'page' => $list->render(),
|
||||
);
|
||||
$this->assign($data);
|
||||
$this->setMeta("广告管理");
|
||||
return $this->fetch();
|
||||
}
|
||||
|
||||
|
||||
@@ -6,9 +6,11 @@
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: molong <molong@tensent.cn> <http://www.tensent.cn>
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\controller\admin;
|
||||
|
||||
use app\controller\Admin;
|
||||
use app\model\AuthGroup;
|
||||
use app\model\AuthRule;
|
||||
|
||||
/**
|
||||
* @title 用户组管理
|
||||
@@ -16,32 +18,21 @@ use app\controller\Admin;
|
||||
*/
|
||||
class Group extends Admin {
|
||||
|
||||
protected $model;
|
||||
protected $rule;
|
||||
|
||||
public function _initialize() {
|
||||
parent::_initialize();
|
||||
$this->group = model('AuthGroup');
|
||||
$this->rule = model('AuthRule');
|
||||
}
|
||||
|
||||
/**
|
||||
* @title 用户组列表
|
||||
*/
|
||||
public function index($type = 'admin') {
|
||||
$map['module'] = $type;
|
||||
$map = [];
|
||||
|
||||
$list = db('AuthGroup')->where($map)->order('id desc')->paginate(10, false, array(
|
||||
'query' => $this->request->param(),
|
||||
));
|
||||
$map[] = ['module', '=', $type];
|
||||
|
||||
$data = array(
|
||||
$list = AuthGroup::where($map)->order('id desc')->paginate($this->request->pageConfig);
|
||||
|
||||
$this->data = array(
|
||||
'list' => $list,
|
||||
'page' => $list->render(),
|
||||
'type' => $type,
|
||||
);
|
||||
$this->assign($data);
|
||||
$this->setMeta('用户组管理');
|
||||
return $this->fetch();
|
||||
}
|
||||
|
||||
@@ -128,19 +119,17 @@ class Group extends Admin {
|
||||
* @title 权限节点
|
||||
*/
|
||||
public function access($type = 'admin') {
|
||||
$map['module'] = $type;
|
||||
$map = [];
|
||||
|
||||
$list = db('AuthRule')->where($map)->order('id desc')->paginate(15, false, array(
|
||||
'query' => $this->request->param(),
|
||||
));
|
||||
$map[] = ['module', '=', $type];
|
||||
|
||||
$data = array(
|
||||
$list = AuthRule::where($map)->order('id desc')->paginate($this->request->pageConfig);
|
||||
|
||||
$this->data = array(
|
||||
'list' => $list,
|
||||
'page' => $list->render(),
|
||||
'type' => $type,
|
||||
);
|
||||
$this->assign($data);
|
||||
$this->setMeta('权限节点');
|
||||
return $this->fetch();
|
||||
}
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace app\model;
|
||||
/**
|
||||
* 分类模型
|
||||
*/
|
||||
class AdPlace {
|
||||
class AdPlace extends \think\Model{
|
||||
|
||||
protected $auto = array('update_time');
|
||||
protected $insert = array('create_time');
|
||||
|
||||
19
app/model/AuthGroup.php
Normal file
19
app/model/AuthGroup.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | SentCMS [ WE CAN DO IT JUST THINK IT ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2013 http://www.tensent.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: molong <molong@tensent.cn> <http://www.tensent.cn>
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\model;
|
||||
|
||||
use think\Model;
|
||||
|
||||
/**
|
||||
* 设置模型
|
||||
*/
|
||||
class AuthGroup extends Model{
|
||||
|
||||
}
|
||||
@@ -34,8 +34,8 @@
|
||||
<td>{$item['id']}</td>
|
||||
<td>{$item['title']}</td>
|
||||
<td>{$item['name']}</td>
|
||||
<td>{$item['create_time']|date='Y-m-d H:i',###}</td>
|
||||
<td>{$item['update_time']|date='Y-m-d H:i',###}</td>
|
||||
<td>{$item['create_time']}</td>
|
||||
<td>{$item['update_time']}</td>
|
||||
<td>
|
||||
<a title="广告列表" href="{:url('lists?id='.$item['id'])}">广告列表</a>
|
||||
<a title="移动" href="{:url('edit?id='.$item['id'])}">编辑</a>
|
||||
|
||||
Reference in New Issue
Block a user