model = new IndexModel(); parent::initialize(); } /** * @return string */ public function index():string { $inputData = $this->request->param(); // banner $bannerList = $this->model->getIndexBanner($this->languageId,$inputData); // 商品banner $goodsBanner = $this->model->getGoodsBanner($this->languageId,$inputData); // 获取推荐商品 $bannerListMobile = $this->model->getIndexBannerMobile($this->languageId,$inputData); // 商品分类 $goodsCategoryList = $this->model->getIndexGoodsCategoryList($this->languageId,$inputData); // 推荐商品 $goodsCommandList = $this->model->getIndexGoodsRecommandList($this->languageId,$inputData); // 增加标签显示 $metaTitle = $this->model->getMetaTitle($this->languageId,'index'); // 首页4张图 $forthImg = $this->model->getGoodsBanner($this->languageId); View::assign('meta',$metaTitle); View::assign('f_image',$forthImg); View::assign('banner_list',$bannerList); View::assign('banner_list_mobile',$bannerListMobile); View::assign('goods_category',$goodsCategoryList); View::assign('goods_is_new',$goodsCommandList); View::assign('goods_banner',$goodsBanner); return View::fetch(Lang::getLangSet().DIRECTORY_SEPARATOR.'index/index'); } }