request->get('name', ''); $search = Yii::$app->request->get('search', ''); if (empty($name)) { $name = $search; } $where = []; if (!empty($name)) { if (stringUtil::isLetter($name)) { $where['py'] = ['like', $name]; } else { $where['name'] = ['like', $name]; } } $list = PtItemClass::getItemList($where, true, $this->mainId); util::success($list); } //获取平台花材详情 ssh 20210826 public function actionDetail() { $id = Yii::$app->request->get('id', 0); $info = PtItemClass::getById($id); if (empty($info)) { util::fail('没有找到花材'); } $shortCover = $info['cover'] ?? ''; $info['shortCover'] = $shortCover; $info['cover'] = imgUtil::groupImg($shortCover); $info['bigCover'] = imgUtil::groupImg($shortCover) . "?x-oss-process=image/resize,m_fill,h_700,w_700"; $info['smallCover'] = imgUtil::groupImg($shortCover) . "?x-oss-process=image/resize,m_fill,h_130,w_130"; util::success($info); } }