stanley-king 3 年之前
父节点
当前提交
683dd5603c
共有 1 个文件被更改,包括 4 次插入7 次删除
  1. 4 7
      admin/control/refill_order.php

+ 4 - 7
admin/control/refill_order.php

@@ -112,11 +112,7 @@ class refill_orderControl extends SystemControl
             $end   = intval(strtotime($input['query_end_time']));
 
             $today = strtotime(date('Y-m-d',time()));
-            $tomorrow = strtotime(date('Y-m-d',time())) + 86400;
-
-            $end_date = strtotime(date('Y-m-d',$end));
-            $start_date = strtotime(date('Y-m-d',$start));
-
+            $tomorrow = $today + 86400;
 
             if($start <= 0) {
                 $start = $today;
@@ -124,11 +120,13 @@ class refill_orderControl extends SystemControl
 
             $cur = time();
             $cur = $cur - ($cur % 300) + 300;
-
             if($end <= 0) {
                 $end = $cur;
             }
 
+            $end_date = strtotime(date('Y-m-d',$end));
+            $start_date = strtotime(date('Y-m-d',$start));
+
             if ($end >= $start)
             {
                 if ($time_type === 'order_time')
@@ -137,7 +135,6 @@ class refill_orderControl extends SystemControl
                     if($add_end > $tomorrow) {
                         $add_end = $tomorrow;
                     }
-
                     return ['order_time' => [$start, $end], 'add_time' => [$start, $add_end]];
                 } elseif ($time_type === 'notify_time') {
                     $add_begin = $start_date - 86400 * 5;