user; if (empty($user)) { util::success(['hd' => $this->shop]); } else { $respond = CustomClass::buildRelation($this->shop, $user); $hd = $respond['hd']; util::success(['hd' => $hd]); } } public function actionList() { $showGlInfo = getenv('SHOW_GL_INFO'); $info = $showGlInfo === false ? 1 : $showGlInfo; if (isset($this->userId) == false || 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); } }