|
|
@@ -3,6 +3,7 @@
|
|
|
namespace mall\controllers;
|
|
|
|
|
|
use bizHd\custom\classes\CustomClass;
|
|
|
+use bizHd\custom\classes\HdClass;
|
|
|
use bizHd\shop\classes\ShopClass;
|
|
|
use bizMall\ad\services\AdService;
|
|
|
use bizMall\goods\services\CategoryService;
|
|
|
@@ -23,6 +24,8 @@ class ShopController extends BaseController
|
|
|
//门店详情 ssh 20230210
|
|
|
public function actionInfo()
|
|
|
{
|
|
|
+ $get = Yii::$app->request->get();
|
|
|
+ $hdId = $get['hdId'] ?? 0;
|
|
|
$shop = $this->shop;
|
|
|
$info = !empty($shop) ? $shop->attributes : [];
|
|
|
if (isset($info['superWx'])) {
|
|
|
@@ -36,11 +39,17 @@ class ShopController extends BaseController
|
|
|
$info['avatar'] = $avatar;
|
|
|
$info['shortAvatar'] = $shortAvatar;
|
|
|
|
|
|
- $user = $this->user;
|
|
|
- $shop = $this->shop;
|
|
|
- $respond = CustomClass::buildRelation($shop, $user);
|
|
|
- $hd = $respond['hd'];
|
|
|
- $custom = $respond['custom'];
|
|
|
+ if (empty($hdId)) {
|
|
|
+ $user = $this->user;
|
|
|
+ $shop = $this->shop;
|
|
|
+ $respond = CustomClass::buildRelation($shop, $user);
|
|
|
+ $hd = $respond['hd'];
|
|
|
+ $custom = $respond['custom'];
|
|
|
+ }else{
|
|
|
+ $hd = HdClass::getById($hdId, true);
|
|
|
+ $customId = $hd->customId;
|
|
|
+ $custom = CustomClass::getById($customId, true);
|
|
|
+ }
|
|
|
|
|
|
util::success(['info' => $info, 'hd' => $hd, 'custom' => $custom]);
|
|
|
}
|