| 12345678910111213141516171819202122232425262728293031323334353637 |
- <?php
- namespace mall\controllers;
- use bizMall\ad\services\AdService;
- use bizMall\goods\services\CategoryService;
- use bizMall\goods\services\GoodsCategoryService;
- use bizMall\invite\services\InviteService;
- use bizMall\merchant\services\MerchantService;
- use bizMall\merchant\services\ShopService;
- use bizMall\user\services\UserService;
- use Yii;
- use yii\web\Controller;
- use common\components\util;
- class ShopController extends BaseController
- {
- //获取商家的默认门店 ssh 2019.12.6
- public function actionDetail()
- {
- $introUserId = Yii::$app->request->get('introUserId');
- $shop = isset($this->shop) && !empty($this->shop) ? $this->shop->attributes : [];
- $ad = [
- ['adImgUrl' => 'https://img.theflorist.cn/example/shop/1.jpg']
- ];
- //新人专享礼物
- $newUserGift = [];
- if (!empty($introUserId)) {
- $userInfo = UserService::getUserInfo($this->userId);
- $newUserGift = InviteService::hasNewGift($userInfo);
- }
- util::success(['ad' => $ad, 'shop' => $shop, 'newUserGift' => $newUserGift]);
- }
- }
|