shish 1 год назад
Родитель
Сommit
a5f631d4a8
1 измененных файлов с 5 добавлено и 4 удалено
  1. 5 4
      console/controllers/PurchaseController.php

+ 5 - 4
console/controllers/PurchaseController.php

@@ -102,11 +102,12 @@ class PurchaseController extends Controller
 
                     //if (!empty($deadline)) {
                         $currentDead = date("Y-m-d H:i", strtotime($deadline));
-                    echo $deadline;die;
-                        $current = date('Y-m-d H:i');
+                        $currentDeadTime = strtotime($currentDead);
+                        $now = strtotime(date('Y-m-d H:i'));
+                        //2分钟
                         $tow = 120;
-                        $totalTime = $current + $tow;
-                        //if ($totalTime == $current) {
+                        $totalTime = $now + $tow;
+                        //if ($totalTime == $currentDeadTime) {
                             $saleId = $cg->saleId ?? 0;
                             $order = OrderClass::getById($saleId, true);
                             if(!empty($order)){