stanley-king il y a 7 ans
Parent
commit
6d5632b7b8
2 fichiers modifiés avec 7 ajouts et 4 suppressions
  1. 1 1
      helper/session_helper.php
  2. 6 3
      mobile/control/bonusex.php

+ 1 - 1
helper/session_helper.php

@@ -254,7 +254,7 @@ class session_helper
 
                 return false;
             }
-            
+
             $author_time = $_SESSION['wxauthor_time'];
             $max_time = 2 * 86400;
             if(time() - $author_time > $max_time) {

+ 6 - 3
mobile/control/bonusex.php

@@ -493,9 +493,12 @@ class bonusexControl extends mobileControl
         }
         else
         {
-            if($bonus == false) return false;
-            $rate_moneys[intval($bonus['bonus_rate'])] = $bonus['bonus_value'];
+            $pred = new predeposit_helper($_SESSION['member_id']);
+
+            $bonus_rate = $pred->bonus_rate();
+            $rate_moneys = $bonus_rate->format();
             $price = bonus_helper::match_price($rate_moneys);
+
             if($price == false) {
                 return false;
             }
@@ -532,7 +535,7 @@ class bonusexControl extends mobileControl
         $summary['goods_jingle'] = $goods_info['goods_jingle'];
         $summary['goods_price'] = intval($goods_info['goods_price'] * 100 + 0.5) / 100;
 
-        $bonus_price  = predeposit_helper::unlogin_bonus_price($goods_info['goods_price'],$rate_moneys,$rates);
+        $bonus_price  = predeposit_helper::login_bonus_price($goods_info['goods_price'],$rates);
         $summary['bonus_price'] = intval($bonus_price * 100 + 0.5) / 100;
 
         $discount = intval($summary['bonus_price'] * 100 / $goods_info['goods_price'] + 0.5) / 100;