隐藏我方分成比例

master
liuweiwen 5 years ago
parent a114c7e659
commit 70c71abac1

@ -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;

@ -106,6 +106,7 @@
<th>原包名</th>
<th>现包名</th>
<th colspan="2">合作方分成比例</th>
<!-- <th colspan="2">我方分成比例</th>-->
</tr>
</thead>
@ -148,17 +149,25 @@
<tr>
<td>{$ratio['name']}</td>
<td>{$ratio['ratio']}</td>
<!-- <td>{$ratio['name']}</td>-->
<!-- <td>{$ratio['my_ratio']}</td>-->
</tr>
<else />
<td>{$ratio['name']}</td>
<td>{$ratio['ratio']}</td>
<!-- <td>{$ratio['name']}</td>-->
<!-- <td>{$ratio['my_ratio']}</td>-->
</if>
</foreach>
<else />
<td >-</td>
<td>-</td>
<!-- <td>-</td>-->
<!-- <td>-</td>-->
</notempty>
</tr>
<else />
<td rowspan="{$game.row}">{$game['game_type_name']}</td>
@ -171,18 +180,25 @@
<tr>
<td>{$ratio['name']}</td>
<td>{$ratio['ratio']}</td>
<!-- <td>{$ratio['name']}</td>-->
<!-- <td>{$ratio['my_ratio']}</td>-->
</tr>
<else />
<td>{$ratio['name']}</td>
<td>{$ratio['ratio']}</td>
<!-- <td>{$ratio['name']}</td>-->
<!-- <td>{$ratio['my_ratio']}</td>-->
</if>
</foreach>
<else />
<td >-</td>
<td>-</td>
<!-- <td>-</td>-->
<!-- <td>-</td>-->
</notempty>
</if>
</foreach>
<else />
@ -191,6 +207,8 @@
<td rowspan="{$data.row}">-</td>
<td rowspan="{$data.row}">-</td>
<td rowspan="{$data.row}">-</td>
<!-- <td rowspan="{$data.row}">-</td>-->
<!-- <td rowspan="{$data.row}">-</td>-->
</notempty>
</tr>

Loading…
Cancel
Save