CpItemController.php 592 B

123456789101112131415161718192021222324252627
  1. <?php
  2. namespace ghs\controllers;
  3. use bizGhs\jh\classes\JhItemClass;
  4. use common\components\util;
  5. use Yii;
  6. class JhItemController extends BaseController
  7. {
  8. //根据集合id取花材,带分页 ssh 20231228
  9. public function actionList()
  10. {
  11. $get = Yii::$app->request->get();
  12. $jhId = $get['jhId'] ?? 0;
  13. $mainId = $this->mainId ?? 0;
  14. $where = [];
  15. $where['mainId'] = $mainId;
  16. if (!empty($jhId)) {
  17. $where['jhId'] = $jhId;
  18. }
  19. $respond = JhItemClass::getItemList($where);
  20. util::success($respond);
  21. }
  22. }