比例格式修正

master
zhengyongxing 4 years ago
parent f18f3ce7e2
commit 1c08d1a221

@ -128,6 +128,7 @@ class PartnerController extends ThinkController
$val['name']="月流水>".$val['begin_total_amount']; $val['name']="月流水>".$val['begin_total_amount'];
} }
} }
$val['ratio'] = floatval($val['ratio']);
$parseGameRadiores[$val['game_id']][] = $val; $parseGameRadiores[$val['game_id']][] = $val;
} }
$myGameRadiores = $parseGameRadiores;//我方分成比例 $myGameRadiores = $parseGameRadiores;//我方分成比例

@ -1321,7 +1321,7 @@ class PromoteCompanyController extends ThinkController
$val['name']="月流水>".$val['begin_total_amount']; $val['name']="月流水>".$val['begin_total_amount'];
} }
} }
$parseGameRadiores[$val['game_id']][] =['name'=>$val['name'],"ratio"=>$val['ratio']]; $parseGameRadiores[$val['game_id']][] =['name'=>$val['name'],"ratio"=>floatval($val['ratio'])];
} }
return $parseGameRadiores; return $parseGameRadiores;
} }
@ -1329,11 +1329,11 @@ class PromoteCompanyController extends ThinkController
protected function setPromoteRadio(&$v){ protected function setPromoteRadio(&$v){
$turnover_ratio = json_decode($v['turnover_ratio'],true); $turnover_ratio = json_decode($v['turnover_ratio'],true);
$v['turnover_ratio'] = array( $v['turnover_ratio'] = array(
array("ratio"=>$v['ratio']."%","name"=>"默认比例") array("ratio"=>floatval($v['ratio'])."%","name"=>"默认比例")
); );
foreach($turnover_ratio as $ke=>$va){ foreach($turnover_ratio as $ke=>$va){
$t=array("ratio"=>$va["ratio"]."%"); $t=array("ratio"=>floatval($va["ratio"])."%");
if(array_key_exists("instanceof",$va)){ if(array_key_exists("instanceof",$va)){
//存在 //存在
if($va['instanceof']=='1'){ if($va['instanceof']=='1'){

Loading…
Cancel
Save