wupengfei 2 years ago
parent
commit
ba5ed825d9
2 changed files with 3 additions and 2 deletions
  1. 1 1
      .idea/workspace.xml
  2. 2 1
      application/common.php

+ 1 - 1
.idea/workspace.xml

@@ -189,7 +189,7 @@
       <workItem from="1668991533353" duration="2596000" />
       <workItem from="1669429338320" duration="861000" />
       <workItem from="1669448616248" duration="5065000" />
-      <workItem from="1669597148644" duration="16222000" />
+      <workItem from="1669597148644" duration="16264000" />
     </task>
     <servers />
   </component>

+ 2 - 1
application/common.php

@@ -3,7 +3,7 @@ use think\Db;
 /**
  * 秒转换为天
  */
-function get_stay_time($remain_time, $is_hour = 1, $is_minutes = 1,$second=1)
+function get_stay_time($remain_time, $is_hour = 1, $is_minutes = 1,$is_second=1)
 {
     $day = floor($remain_time / (3600*24));
     $day = $day > 0 ? $day.'天' : '';
@@ -13,6 +13,7 @@ function get_stay_time($remain_time, $is_hour = 1, $is_minutes = 1,$second=1)
         $minutes = floor((($remain_time % (3600*24)) % 3600) / 60);
         $minutes = $minutes > 0 ? $minutes.'分钟' : '';
         $second = floor((($remain_time % (3600*24)) % 3600) / 3600);
+        var_dump($second);
         $second = $second > 0 ? $second.'秒' : '';
         return $day.$hour.$minutes.$second;
     }