request->get(); $id = $get['id'] ?? 0; $hd = HdClass::getById($id); if (empty($hd)) { util::fail('没有花店信息'); } if ($hd['userId'] != $this->userId) { util::fail('不是你的店'); } $shortAvatar = !empty($val['avatar']) ? $val['avatar'] : 'hhb_small.png'; $smallAvatar = imgUtil::groupImg($shortAvatar) . "?x-oss-process=image/resize,m_fill,h_130,w_130"; $bigAvatar = imgUtil::groupImg($shortAvatar) . "?x-oss-process=image/resize,m_fill,h_700,w_700"; $hd['shortAvatar'] = $shortAvatar; $hd['smallAvatar'] = $smallAvatar; $hd['bigAvatar'] = $bigAvatar; util::success($hd); } //花店信息 ssh 20230111 public function actionInfo() { $get = Yii::$app->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 = HdClass::getById($id, true); $customId = $hd->customId; $custom = \bizMall\custom\classes\CustomClass::getById($customId, true); } util::success(['hd' => $hd, 'custom' => $custom]); } } public function actionList() { $where = []; $where['userId'] = $this->userId; $where['delStatus'] = 0; $respond = HdClass::getHdList($where); util::success($respond); } }