From 70c71abac1e4385d1171aac6600298b6a68aac19 Mon Sep 17 00:00:00 2001 From: liuweiwen <“529520975@qq.com> Date: Tue, 18 Feb 2020 13:37:45 +0800 Subject: [PATCH] =?UTF-8?q?=E9=9A=90=E8=97=8F=E6=88=91=E6=96=B9=E5=88=86?= =?UTF-8?q?=E6=88=90=E6=AF=94=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controller/PartnerController.class.php | 12 ++++++++++-- Application/Admin/View/Partner/lists.html | 18 ++++++++++++++++++ 2 files changed, 28 insertions(+), 2 deletions(-) diff --git a/Application/Admin/Controller/PartnerController.class.php b/Application/Admin/Controller/PartnerController.class.php index e33d3a61b..b4ba3211c 100644 --- a/Application/Admin/Controller/PartnerController.class.php +++ b/Application/Admin/Controller/PartnerController.class.php @@ -98,9 +98,10 @@ class PartnerController extends ThinkController ->select(); // dd($cp_game_ratio_map); - $parseGameRadiores = array(); + $parseGameRadiores = array();//合作方分成比例 foreach ($gameradiores as $key =>$val) { $val['row'] = 1; + $val['my_ratio'] = 100 - $val['ratio']; if ($val['begin_total_amount'] == 0) { $val['name'] = '默认比例'; if (isset($parseGameRadiores[$val['game_id']])) { @@ -115,11 +116,18 @@ class PartnerController extends ThinkController } $parseGameRadiores[$val['game_id']][] = $val; } -// dd($parseGameRadiores); + $myGameRadiores = $parseGameRadiores;//我方分成比例 + foreach ($myGameRadiores as $key => &$val) { + foreach ($val as $k => &$v) { + $v['ratio'] = 100 - $v['ratio']; + } + } + $parseGames = array(); foreach ($games as $key =>$val) { $val['game_ratio'] = $parseGameRadiores[$val['id']]; + $val['my_game_ratio'] = $myGameRadiores[$val['id']]; if(array_key_exists($val['id'],$parseGameRadiores)){//游戏有比例 $row2 = array_sum(array_column($val['game_ratio'], 'row')) ; $val['row'] = empty($row2) ? 1: $row2; diff --git a/Application/Admin/View/Partner/lists.html b/Application/Admin/View/Partner/lists.html index 4c82b2082..391321a57 100644 --- a/Application/Admin/View/Partner/lists.html +++ b/Application/Admin/View/Partner/lists.html @@ -106,6 +106,7 @@ 原包名 现包名 合作方分成比例 + @@ -148,17 +149,25 @@ {$ratio['name']} {$ratio['ratio']} + + {$ratio['name']} {$ratio['ratio']} + + - - + + + + {$game['game_type_name']} @@ -171,18 +180,25 @@ {$ratio['name']} {$ratio['ratio']} + + {$ratio['name']} {$ratio['ratio']} + + - - + + + @@ -191,6 +207,8 @@ - - - + +