HdController.php 1013 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. namespace mall\controllers;
  3. use bizHd\custom\classes\HdClass;
  4. use common\components\util;
  5. use bizHd\custom\classes\CustomClass;
  6. class HdController extends BaseController
  7. {
  8. //花店信息 ssh 20230111
  9. public function actionInfo()
  10. {
  11. $user = $this->user;
  12. if (empty($user)) {
  13. util::fail('没有信息');
  14. }
  15. $respond = CustomClass::buildRelation($this->shop, $user);
  16. $hd = $respond['hd'];
  17. util::success(['hd' => $hd]);
  18. }
  19. public function actionList()
  20. {
  21. $showGlInfo = getenv('SHOW_GL_INFO');
  22. $info = $showGlInfo === false ? 1 : $showGlInfo;
  23. if (isset($this->userId) == false || empty($this->userId)) {
  24. util::success(['list' => [], 'showGlInfo' => $info]);
  25. }
  26. $where = [];
  27. $where['userId'] = $this->userId;
  28. $where['delStatus'] = 0;
  29. $respond = HdClass::getHdList($where);
  30. $respond['showGlInfo'] = $info;
  31. util::success($respond);
  32. }
  33. }