소스 검색

会员升级

Kirin 2 년 전
부모
커밋
cbd2cdcfb1
1개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  1. 3 1
      app/controller/api/v1/PublicController.php

+ 3 - 1
app/controller/api/v1/PublicController.php

@@ -70,11 +70,13 @@ class PublicController extends BaseController
         $sum_money = 30000;
         $money = 800000;
         $extract_fee = 0;
+        $max = PHP_INT_MAX;
         var_dump($fees);
         foreach ($fees as $k => $v) {
-            if ($sum_money > $k) {
+            if ($sum_money > $max) {
                 break;
             }
+            $max = $k;
             if ($sum_money + $money > $k) {
                 var_dump($money);
                 $extract_fee = bcadd($extract_fee, bcmul((string)($sum_money + $money - $k), bcdiv($v, '100', 4), 2));