HdController.php 622 B

12345678910111213141516171819202122232425
  1. <?php
  2. namespace mall\controllers;
  3. use bizHd\custom\classes\HdClass;
  4. use common\components\util;
  5. class HdController extends BaseController
  6. {
  7. public function actionList()
  8. {
  9. $showGlInfo = getenv('SHOW_GL_INFO');
  10. $info = $showGlInfo === false ? 1 : $showGlInfo;
  11. if (isset($this->userId) == false || empty($this->userId)) {
  12. util::success(['list' => [], 'showGlInfo' => $info]);
  13. }
  14. $where = [];
  15. $where['userId'] = $this->userId;
  16. $respond = HdClass::getHdList($where);
  17. $respond['showGlInfo'] = $info;
  18. util::success($respond);
  19. }
  20. }