Kaynağa Gözat

vue_admin_action

Panda 3 ay önce
ebeveyn
işleme
770a8f7315
1 değiştirilmiş dosya ile 2 ekleme ve 2 silme
  1. 2 2
      application/api/controller/Hotel.php

+ 2 - 2
application/api/controller/Hotel.php

@@ -190,7 +190,7 @@ class Hotel extends Api
         $list = $query->order('id','desc')->autopage()->select();
         foreach ($list as $key=>$val){
             if ($val['status'] == 1){
-                if ($val['start_date'] > date('Y-m-d')){
+                if (strtotime($val['start_date'] . '12:00:00') > time()){
                     $list[$key]['status_code'] = 1;
                     $list[$key]['status_txt'] = '待入住';
                 }else{
@@ -219,7 +219,7 @@ class Hotel extends Api
 
         $info = $query->find();
         if ($info['status'] == 1){
-            if ($info['start_date'] > date('Y-m-d')){
+            if (strtotime($val['start_date'] . '12:00:00') > time()){
                 $info['status_code'] = 1;
                 $info['status_txt'] = '待入住';
             }else{