diff --git a/Application/Admin/Controller/PromoteController.class.php b/Application/Admin/Controller/PromoteController.class.php index c17d531f2..654a0b42d 100644 --- a/Application/Admin/Controller/PromoteController.class.php +++ b/Application/Admin/Controller/PromoteController.class.php @@ -97,7 +97,7 @@ unset($_REQUEST['parent_id']); parent::order_lists(self::model_name,$p,$map); } - private function siteApplyList($request,$p){ + private function siteApplyList($p){ if(isset($_REQUEST['promote_id'])){ $map['promote_id']=$_REQUEST['promote_id']; unset($_REQUEST['promote_id']); diff --git a/Application/Home/Controller/PromoteCoinController.class.php b/Application/Home/Controller/PromoteCoinController.class.php index 953193a23..e81487c71 100644 --- a/Application/Home/Controller/PromoteCoinController.class.php +++ b/Application/Home/Controller/PromoteCoinController.class.php @@ -756,9 +756,10 @@ class PromoteCoinController extends BaseController { $account = I('account', ''); $mobile = I('mobile', ''); - $id = session('promote_auth.pid'); - $promoteIds = D('Promote')->field('id')->where('parent_id=' . $id . ' or grand_id=' . $id)->select(); - $promoteIds = array_merge(array_column($promoteIds, 'id'), [$id]); + $promote = $this->getLoginPromote(); + $map = ['chain' => ['like', $promote['chain'] . $promote['id'] . '/%']]; + $promoteIds = D('Promote')->field('id')->where($map)->getField('id', true); + $promoteIds[] = $id; $rows = D('UserPlay')->field(['id', 'user_id'])->where(['promote_id' => ['in', $promoteIds]])->select(); $map = []; diff --git a/Application/Home/Controller/QueryController.class.php b/Application/Home/Controller/QueryController.class.php index 33c30beb4..3d851aa28 100644 --- a/Application/Home/Controller/QueryController.class.php +++ b/Application/Home/Controller/QueryController.class.php @@ -1974,7 +1974,7 @@ class QueryController extends BaseController $parent = null; if ($parentId > 0) { $parent = M('promote', 'tab_')->where(['id' => $parentId])->find(); - $currentDisplay = $promoteService->getLevelName($promote['level']) . '推广'; + $currentDisplay = $promoteService->getLevelName($parent['level']) . '推广'; $prevParentId = $parent['parent_id'] == $loginPromote['parent_id'] ? 0 : $parent['parent_id']; } else { $parent = $loginPromote; diff --git a/Application/Home/View/default/Public/promote_base.html b/Application/Home/View/default/Public/promote_base.html index 2cf7b0393..d24f4cc5d 100644 --- a/Application/Home/View/default/Public/promote_base.html +++ b/Application/Home/View/default/Public/promote_base.html @@ -69,15 +69,15 @@ - - + +