|
|
@@ -13,12 +13,20 @@ class HdController extends BaseController
|
|
|
public function actionInfo()
|
|
|
{
|
|
|
$user = $this->user;
|
|
|
+ $shop = $this->shop;
|
|
|
if (empty($user)) {
|
|
|
- util::success(['hd' => $this->shop]);
|
|
|
+ $hd = [];
|
|
|
+ if (!empty($shop)) {
|
|
|
+ $name = $shop->name ?? '';
|
|
|
+ $hd = ['name' => $name];
|
|
|
+ }
|
|
|
+ $custom = [];
|
|
|
+ util::success(['hd' => $hd, 'custom' => $custom]);
|
|
|
} else {
|
|
|
- $respond = CustomClass::buildRelation($this->shop, $user);
|
|
|
+ $respond = CustomClass::buildRelation($shop, $user);
|
|
|
$hd = $respond['hd'];
|
|
|
- util::success(['hd' => $hd]);
|
|
|
+ $custom = $respond['custom'];
|
|
|
+ util::success(['hd' => $hd, 'custom' => $custom]);
|
|
|
}
|
|
|
}
|
|
|
|