Kirin 2 years ago
parent
commit
b219b3d819
1 changed files with 3 additions and 0 deletions
  1. 3 0
      app/admin/controller/store/Placeorder.php

+ 3 - 0
app/admin/controller/store/Placeorder.php

@@ -122,9 +122,11 @@ class Placeorder extends AuthController
             $product = \app\admin\model\store\StoreProduct::get($info['product_id']);
             $product = \app\admin\model\store\StoreProduct::get($info['product_id']);
             $discounts = json_decode($product['time_area_discount'] ?: '[]', true);
             $discounts = json_decode($product['time_area_discount'] ?: '[]', true);
             $discount = 0;
             $discount = 0;
+            var_dump($discounts);
             if (count($discounts) > 0) {
             if (count($discounts) > 0) {
                 foreach ($discounts as $kk => $v) {
                 foreach ($discounts as $kk => $v) {
                     $times = explode('-', $kk);
                     $times = explode('-', $kk);
+                    var_dump($times);
                     if (!(count($times) == 2)) {
                     if (!(count($times) == 2)) {
                         break;
                         break;
                     }
                     }
@@ -134,6 +136,7 @@ class Placeorder extends AuthController
                         $discount = $v;
                         $discount = $v;
                     }
                     }
                 }
                 }
+                var_dump($discount);
             }
             }
             if ($discount > 0) {
             if ($discount > 0) {
                 $info['price'] = bcmul(bcdiv($discount, 100, 4), $info['price'], 2);
                 $info['price'] = bcmul(bcdiv($discount, 100, 4), $info['price'], 2);