|
|
@@ -5,22 +5,38 @@ namespace client\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);
|
|
|
- util::success(['ad' => $ad, 'shop' => $shop]);
|
|
|
+
|
|
|
+ //新人专享礼物
|
|
|
+ $newUserGift = [];
|
|
|
+ if (!empty($introUserId)) {
|
|
|
+ $userInfo = UserService::getUserInfo($this->userId);
|
|
|
+ $newUserGift = InviteService::getNewUserGift($userInfo);
|
|
|
+ }
|
|
|
+ util::success(['ad' => $ad, 'shop' => $shop, 'newUserGift' => $newUserGift]);
|
|
|
}
|
|
|
+
|
|
|
+ //领取优惠券 shish 2019.12.14
|
|
|
+ public function actionGetCoupon()
|
|
|
+ {
|
|
|
|
|
|
+ }
|
|
|
+
|
|
|
}
|