Parcourir la source

Merge branch 'bonus_rate' of 121.43.114.153:/home/git/repositories/shopnc into bonus_rate

stanley-king il y a 7 ans
Parent
commit
2dcfd76203

+ 1 - 1
mobile/control/bargain.php

@@ -250,7 +250,7 @@ class tpl_bargain
                             <div class=\"price_box\">
                                 <span class=\"current_price\" id=\"current_price\">现价¥{$cur_price}</span>
                                 <span class=\"floor_price\">可砍至{$lowest}元</span>
-                                <input type=\"hidden\" value=\"{$cur_price}\" id=\"cur_price\">
+                                <input type=\"hidden\" value=\"{$summary['goods_price']}\" id=\"goods_price\">
                                 <input type=\"hidden\" value=\"{$lowest}\" id=\"lowest_price\">
                             </div>
                         </div>

+ 2 - 2
mobile/control/control.php

@@ -297,9 +297,9 @@ class mbMemberControl extends mobileControl
 
 function bonus_version()
 {
-    return "v=2018020108";
+    return "v=2018020501";
 }
 function shop_version()
 {
-    return "v=2018020108";
+    return "v=2018020501";
 }

+ 5 - 6
mobile/templates/default/bargain/bargain.php

@@ -342,19 +342,18 @@
         online = false;
     }
 
-    var surplus_price = $('#cur_price').val();
-    var lowest_price = $('#lowest_price').val();
     function message(datas)
     {
         var msg_type = datas.op;
         console.log(datas);
         try
         {
+            var goods_price  = $('#goods_price').val();
+            var lowest_price = $('#lowest_price').val();
+
             if(msg_type == 'bargain') {
                 var discount = datas.content.discount;
-                var cur_price = surplus_price - discount;
-                priceChange(cur_price);
-                surplus_price = cur_price;
+                priceChange(goods_price - discount);
                 slideMsgs.addChild(datas).play();
             }
             else if(msg_type =='ret_bargain') {
@@ -368,7 +367,7 @@
                 };
                 $('.ret_bargain').text(ret_bargain_price);
 
-                var gap = surplus_price - lowest_price - discount;
+                var gap = goods_price - lowest_price - discount;
                 gap = (parseInt(gap * 100 + 0.5) / 100).toFixed(2);
                 $('.balance').text(gap);
                 $('.pop').removeClass('hide');