From 9e609c927826210813086a2b2e58b9536a3013c4 Mon Sep 17 00:00:00 2001 From: ELF <360197197@qq.com> Date: Sun, 29 Sep 2019 10:42:11 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Home/Controller/QueryController.class.php | 29 ++++- .../View/default/Query/userRecharges.html | 105 ++++++------------ .../Home/View/default/Query/userRoles.html | 61 ++++++++-- 3 files changed, 109 insertions(+), 86 deletions(-) diff --git a/Application/Home/Controller/QueryController.class.php b/Application/Home/Controller/QueryController.class.php index 38c7c8003..2974f81d7 100644 --- a/Application/Home/Controller/QueryController.class.php +++ b/Application/Home/Controller/QueryController.class.php @@ -1216,8 +1216,11 @@ class QueryController extends BaseController ]; $ids = M('promote', 'tab_')->where($map)->getField('id', true); - $promotes = $this->getGroupPromotes($promote); + $promotes = []; $groupPromotes = $this->getGroupPromotes($promote); + if ($promote['parent_id'] > 0 && $promote['grand_id'] == 0) { + $promotes = $this->getNormalPromotes($promote); + } $map = []; $map = ['promote_id' => ['in', $ids]]; @@ -1262,7 +1265,8 @@ class QueryController extends BaseController } else { if ($headmanPromoteId != 0) { $map['promote_id'] = $headmanPromoteId; - } elseif ($promoteId != 0) { + } + if ($promoteId != 0) { $map['promote_id'] = $promoteId; } } @@ -1271,6 +1275,8 @@ class QueryController extends BaseController $games = $this->getGamesByPromote($promote); + $this->assign('promotes', $promotes); + $this->assign('groupPromotes', $groupPromotes); $this->assign('games', $games); $this->assign('records', $records); $this->assign('pagination', $pagination); @@ -1298,8 +1304,11 @@ class QueryController extends BaseController ]; $ids = M('promote', 'tab_')->where($map)->getField('id', true); - $promotes = $this->getGroupPromotes($promote); + $promotes = []; $groupPromotes = $this->getGroupPromotes($promote); + if ($promote['parent_id'] > 0 && $promote['grand_id'] == 0) { + $promotes = $this->getNormalPromotes($promote); + } $map = $spendMap = ['promote_id' => ['in' => $ids]]; if ($gameId != 0) { @@ -1324,7 +1333,8 @@ class QueryController extends BaseController if ($headmanPromoteId != 0) { $map['promote_id'] = $headmanPromoteId; $spendMap['promote_id'] = $headmanPromoteId; - } elseif ($promoteId != 0) { + } + if ($promoteId != 0) { $map['promote_id'] = $promoteId; $spendMap['promote_id'] = $promoteId; } @@ -1422,6 +1432,17 @@ class QueryController extends BaseController ]); } + public function getSubPromotes() + { + $promoteId = I('promote_id', 0); + $promotes = M('promote', 'tab_')->field(['id', 'account'])->where(['parent_id' => $promoteId])->select(); + $this->ajaxReturn([ + 'status' => 1, + 'msg' => '成功', + 'data' => ['promotes' => $promotes] + ]); + } + /** * [充值详细信息] * @param $id [充值id] diff --git a/Application/Home/View/default/Query/userRecharges.html b/Application/Home/View/default/Query/userRecharges.html index 58eda9e60..c537a8270 100644 --- a/Application/Home/View/default/Query/userRecharges.html +++ b/Application/Home/View/default/Query/userRecharges.html @@ -25,15 +25,15 @@