| 123456789101112131415161718192021222324252627282930313233343536 |
- <?php
- namespace mall\controllers;
- use biz\ad\services\AdService;
- use biz\goods\services\CategoryService;
- use biz\goods\services\GoodsCategoryService;
- use biz\invite\services\InviteService;
- use biz\merchant\services\MerchantService;
- use biz\merchant\services\ShopService;
- use biz\user\services\UserService;
- use Yii;
- use yii\web\Controller;
- use common\components\util;
- class ShopController extends BaseController
- {
-
- //获取商家的默认门店 shish 2019.12.6
- public function actionDetail()
- {
- $introUserId = Yii::$app->request->get('introUserId');
- $merchant = $this->merchant;
- $shop = ShopService::getDefaultShop($merchant);
- $ad = AdService::getValidAdList($this->merchantId);
-
- //新人专享礼物
- $newUserGift = [];
- if (!empty($introUserId)) {
- $userInfo = UserService::getUserInfo($this->userId);
- $newUserGift = InviteService::hasNewGift($userInfo);
- }
- util::success(['ad' => $ad, 'shop' => $shop, 'newUserGift' => $newUserGift]);
- }
- }
|