功能更新
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user