| 123456789101112131415161718192021222324252627 |
- <?php
- namespace client\controllers;
- use biz\goods\services\CategoryService;
- use biz\goods\services\GoodsCategoryService;
- use Yii;
- use yii\web\Controller;
- use common\components\util;
- class MainController extends BaseController
- {
- //首页 shish 2019.12.2
- public function actionIndex()
- {
- $ad = [
- ['adImg' => 'http://img.fjglhs.com/images/glhs/glhs_banner1.jpg', 'url' => 'http://www.baidu.com'],
- ['adImg' => 'http://img.fjglhs.com/images/glhs/glhs_banner2.jpg', 'url' => 'http://www.baidu.com'],
- ['adImg' => 'http://img.fjglhs.com/images/glhs/glhs_banner3.jpg', 'url' => 'http://www.baidu.com'],
- ];
- $category = CategoryService::getTopThreeCategory($this->merchantId);
- $categoryList = !empty($category) ? GoodsCategoryService::getAppointCategoryList($category) : [];
- $data = ['ad' => $ad, 'category' => $categoryList, 'columnStyle' => rand(1, 2)];
- util::success($data);
- }
-
- }
|