Commit 681c9be2 by 冷斌

fix bug

parent 202911f5
...@@ -169,9 +169,12 @@ class ProfitController extends HomebaseController ...@@ -169,9 +169,12 @@ class ProfitController extends HomebaseController
$data = $this->getInfo(); $data = $this->getInfo();
$uid=I("uid"); $uid=I("uid");
$user = M('users')->where("id={$uid}")->find(); $user = M('users')->where("id={$uid}")->find();
$data['votes'] = $user['votes']; $config = getConfigPri();
$data['i_votes'] = $user['i_votes']; $cash_rate = $config['cash_rate'];
$data['f_votes'] = $user['f_votes'];
$data['votes'] = (string)floor($user['votes'] / $cash_rate);
$data['i_votes'] = (string)floor($user['i_votes'] / $cash_rate);
$data['f_votes'] = (string)floor($user['f_votes'] / $cash_rate);
echo json_encode(array("ret"=>200,'data'=>$data,'msg'=>'')); echo json_encode(array("ret"=>200,'data'=>$data,'msg'=>''));
die; die;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment