diff --git a/Application/Home/Controller/QueryController.class.php b/Application/Home/Controller/QueryController.class.php index 058b4a075..45d59a2bf 100644 --- a/Application/Home/Controller/QueryController.class.php +++ b/Application/Home/Controller/QueryController.class.php @@ -1681,7 +1681,7 @@ class QueryController extends BaseController return $levelPromote; } - private function getQueryPromote($levelPromote) + private function getQueryPromote($levelPromote, \Closure $whenNotSearch = null) { $queryPromote = null; $promote = $this->getLoginPromote(); @@ -1693,6 +1693,11 @@ class QueryController extends BaseController } if ($queryPromoteId == 0) { $queryPromote = $this->getLoginPromote(); + if ($whenNotSearch) { + $queryPromote = $whenNotSearch(); + } else { + $queryPromote = $this->getLoginPromote(); + } } else { $queryPromote = M('promote', 'tab_')->where(['id' => $queryPromoteId])->find(); }