更新目录结构

This commit is contained in:
molong
2022-04-29 20:26:03 +08:00
parent 4ef43e0258
commit ca1fbd6fd1
89 changed files with 529 additions and 381 deletions

View File

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