比例格式修正

master
zhengyongxing 4 years ago
parent 288078c959
commit 3adf8a93f8

@ -966,11 +966,11 @@ class CompanyGameRatioController extends AdminController
$turnoverratio = json_decode($turnover_ratio[$key],true); $turnoverratio = json_decode($turnover_ratio[$key],true);
$v['turnover_ratios'][$key] = array( $v['turnover_ratios'][$key] = array(
array("ratio"=>$value."%","name"=>"默认比例") array("ratio"=>floatval($value)."%","name"=>"默认比例")
); );
foreach($turnoverratio as $ke=>$va){ foreach($turnoverratio 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'){

@ -214,11 +214,11 @@ class GameRatioMouldController extends AdminController
protected function readTurnoverRatio(&$v){ protected function readTurnoverRatio(&$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