shish 6 лет назад
Родитель
Сommit
bcd5eeb46f
1 измененных файлов с 5 добавлено и 1 удалено
  1. 5 1
      app/mall/controllers/MainController.php

+ 5 - 1
app/mall/controllers/MainController.php

@@ -2,6 +2,7 @@
 
 namespace mall\controllers;
 
+use biz\ad\services\AdService;
 use biz\goods\services\CategoryService;
 use biz\goods\services\GoodsCategoryService;
 use Yii;
@@ -18,10 +19,13 @@ class MainController extends BaseController
 			['adImg' => 'http://img.fjglhs.com/images/glhs/glhs_banner2.jpg', 'url' => ''],
 			['adImg' => 'http://img.fjglhs.com/images/glhs/glhs_banner3.jpg', 'url' => ''],
 		];
+		$where = ['merchantId' => $this->merchantId, 'type' => 0, 'status' => 1];
+		$ad = AdService::getAdList($where);
+		dd($ad);
 		$category = CategoryService::getTopThreeCategory($this->merchantId);
 		$categoryList = !empty($category) ? GoodsCategoryService::getAppointCategoryList($category) : [];
 		$data = ['ad' => $ad, 'category' => $categoryList, 'columnStyle' => rand(1, 2)];
 		util::success($data);
 	}
-
+	
 }