Browse Source

小数截取

afa 1 year ago
parent
commit
06be418f61
1 changed files with 1 additions and 1 deletions
  1. 1 1
      application/api/controller/Order.php

+ 1 - 1
application/api/controller/Order.php

@@ -148,7 +148,7 @@ class Order extends Api
             'user_id'       => $user['id'],
             'title'         => $goods_info['title'],
             'amount'        => $goods_info['price'],
-            'bonus'         => $goods_info['price'] * $task_income,
+            'bonus'         => round($goods_info['price'] * $task_income, 3),
             'user_type'     => $user['user_type'],
             'status'        => OrderModel::Pending,
         ];