From 7547e867bb3bd9522af6f4fde447e1dd79aae61e Mon Sep 17 00:00:00 2001 From: ELF <360197197@qq.com> Date: Mon, 4 Nov 2019 16:42:34 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=89=E7=BA=A7=E5=8F=98=E5=9B=9B=E7=BA=A7?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controller/PromoteController.class.php | 2 +- .../PromoteCoinController.class.php | 7 +- .../Home/Controller/QueryController.class.php | 2 +- .../View/default/Public/promote_base.html | 14 +- .../Home/View/default/Query/users.html | 121 ------------------ 5 files changed, 13 insertions(+), 133 deletions(-) delete mode 100644 Application/Home/View/default/Query/users.html 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 @@ - - +