功能更新

This commit is contained in:
2020-02-18 14:59:20 +08:00
parent 8bc0f7534b
commit 0d7635b972
6 changed files with 48 additions and 50 deletions

View File

@@ -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();
}