收益计算小数点保留4位

This commit is contained in:
2025-09-03 16:00:45 +08:00
parent 6d68a72144
commit ceab1684db

View File

@@ -1102,7 +1102,10 @@ function handelCharge($where,$data){
function coin_earning($all_gift_price,$ratio){
//rmb_coin_ratio 人民币转换金币的比例
//金币转换人民币
return $all_gift_price * $ratio / 100 / get_system_config_value('rmb_coin_ratio');
//小数点保留4位
$result = $all_gift_price * $ratio / 100 / get_system_config_value('rmb_coin_ratio');
return round($result, 4);
}
/**