<?php
/**
 * User: liuyuzhen
 * Date: 2018/5/28
 * Time: 15:23
 * Description:
 */

class AdvController extends \Our\Controller_AbstractIndex {



    public function getAdvsAction(){
        $advService = \Business\Common\AdvServiceModel::getInstance();
        $data = $this->req[\Our\NameConst::data];
        $result = $advService->getAdvs($data);
        if($result){
            $this->success($result);
        }
        \Error\ErrorModel::throwException(\Error\CodeConfigModel::emptyAdvs);
    }

    public function getStoreCoverAction(){
        $advService = \Business\Common\AdvServiceModel::getInstance();
        $data = $this->req[\Our\NameConst::data];
        $storeCover = $advService->getStoreCover($data);
        $this->success($storeCover);
    }

    public function getStoreMiddleAdvsAction(){
        $advService = \Business\Common\AdvServiceModel::getInstance();
        $data = $this->req[\Our\NameConst::data];
        $storeMiddleAdvs = $advService->getStoreMiddleAdvs($data);
        $this->success($storeMiddleAdvs);
    }
}