request->get(); $id = $get['id'] ?? 0; $user = $this->user; $shop = $this->shop; if (empty($user)) { $hd = []; if (!empty($shop)) { $sjName = $shop->merchantName ?? ''; $name = $shop->shopName == '首店' ? $sjName : $sjName . ' ' . $shop->shopName; $hd = ['name' => $name]; } $custom = []; util::success(['hd' => $hd, 'custom' => $custom]); } else { if (empty($id)) { $respond = CustomClass::buildRelation($shop, $user); $hd = $respond['hd']; $custom = $respond['custom']; } else { $hd = \bizMall\hd\classes\HdClass::getById($id, true); $customId = $hd->customId; $custom = \bizMall\custom\classes\CustomClass::getById($customId, true); } util::success(['hd' => $hd, 'custom' => $custom]); } } public function actionList() { $showGlInfo = getenv('SHOW_GL_INFO'); $info = $showGlInfo === false ? 1 : $showGlInfo; if (empty($this->userId)) { util::success(['list' => [], 'showGlInfo' => $info]); } $where = []; $where['userId'] = $this->userId; $where['delStatus'] = 0; $respond = HdClass::getHdList($where); $respond['showGlInfo'] = $info; util::success($respond); } }