更新目录结构
This commit is contained in:
@@ -8,8 +8,7 @@
|
||||
// +----------------------------------------------------------------------
|
||||
namespace app\controller\admin;
|
||||
|
||||
use app\model\AdPlace;
|
||||
use app\model\Ad as AdModel;
|
||||
use app\services\Adservice;
|
||||
|
||||
/**
|
||||
* @title 广告管理
|
||||
@@ -20,11 +19,9 @@ class Ad extends Base {
|
||||
/**
|
||||
* @title 广告位管理
|
||||
*/
|
||||
public function index() {
|
||||
$map = [];
|
||||
$order = "id desc";
|
||||
public function index(Adservice $service) {
|
||||
|
||||
$list = AdPlace::where($map)->order($order)->paginate($this->request->pageConfig);
|
||||
$list = $service->getAdPlaceList($this->request);
|
||||
|
||||
$this->data = array(
|
||||
'list' => $list,
|
||||
@@ -47,7 +44,7 @@ class Ad extends Base {
|
||||
}
|
||||
} else {
|
||||
$this->data = array(
|
||||
'keyList' => AdPlace::$keyList,
|
||||
'keyList' => \app\model\ads\AdPlace::$keyList,
|
||||
);
|
||||
return $this->fetch('admin/public/edit');
|
||||
}
|
||||
@@ -72,7 +69,7 @@ class Ad extends Base {
|
||||
}
|
||||
$this->data = array(
|
||||
'info' => $info,
|
||||
'keyList' => AdPlace::$keyList,
|
||||
'keyList' => \app\model\ads\AdPlace::$keyList,
|
||||
);
|
||||
return $this->fetch('admin/public/edit');
|
||||
}
|
||||
@@ -129,7 +126,7 @@ class Ad extends Base {
|
||||
$info['place_id'] = $id;
|
||||
$this->data = array(
|
||||
'info' => $info,
|
||||
'keyList' => AdModel::$keyList,
|
||||
'keyList' => \app\model\ads\Ad::$keyList,
|
||||
);
|
||||
return $this->fetch('admin/public/edit');
|
||||
}
|
||||
@@ -155,7 +152,7 @@ class Ad extends Base {
|
||||
}
|
||||
$this->data = array(
|
||||
'info' => $info,
|
||||
'keyList' => AdModel::$keyList,
|
||||
'keyList' => \app\model\ads\Ad::$keyList,
|
||||
);
|
||||
return $this->fetch('admin/public/edit');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user