1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- <?php
- /**
- * Slide.php UTF-8
- *
- *
- * @date : 2017/11/25 15:06
- *
- * @license 这不是一个自由软件,未经授权不许任何使用和传播。
- * @author : wuyonghong <wyh@huosdk.com>
- * @version : HUOSDK 8.0
- */
- namespace huo\controller\slide;
- use huo\controller\common\Base;
- use huo\logic\slide\SlideLogic;
- use huolib\status\AdsStatus;
- class Slide extends Base {
- protected $slide_model;
- public function __construct(SlideLogic $slide_model = null) {
- if (null === $slide_model) {
- $this->slide_model = new SlideLogic();
- } else {
- $this->slide_model = $slide_model;
- }
- }
- /**
- * @param string $type
- * @param string $page
- *
- * @return array
- */
- public function getList($type, $page = '') {
- if (empty($type)) {
- $_code = AdsStatus::ADSTYPE_EMPTY;
- return $this->huoError($_code, AdsStatus::getMsg($_code));
- }
- $_map['type'] = $type;
- $_data = (new SlideLogic())->getList($_map, $page);
- if (is_numeric($_data)) {
- $_code = $_data;
- return $this->huoError($_code, AdsStatus::getMsg($_code));
- }
- $_code = AdsStatus::NO_ERROR;
- return $this->huoSuccess($_code, AdsStatus::getMsg($_code), $_data);
- }
- }
|