wesmiler 1 неделя назад
Родитель
Сommit
01de4a0ffb
1 измененных файлов с 5 добавлено и 5 удалено
  1. 5 5
      app/Services/Api/MemberService.php

+ 5 - 5
app/Services/Api/MemberService.php

@@ -408,16 +408,16 @@ class MemberService extends BaseService
             $info['is_vip_4'] = $isVip4;
             $info['vip_expired'] = $vipExpired;
             $info['vip_1_expired'] = $vip1Expired;
-            $info['vip_1_day'] = max(0, intval((strtotime($vip1Expired) - time()) / 86400));
+            $info['vip_1_day'] = max(0, ceil((strtotime($vip1Expired) - time()) / 86400));
             $info['vip_2_expired'] = $vip2Expired;
-            $info['vip_2_day'] = max(0, intval((strtotime($vip2Expired) - time()) / 86400));
+            $info['vip_2_day'] = max(0, ceil((strtotime($vip2Expired) - time()) / 86400));
             $info['vip_3_expired'] = $vip3Expired;
-            $info['vip_3_day'] = max(0, intval((strtotime($vip3Expired) - time()) / 86400));
+            $info['vip_3_day'] = max(0, ceil((strtotime($vip3Expired) - time()) / 86400));
             $info['vip_4_expired'] = $vip4Expired;
-            $info['vip_4_day'] = max(0, intval((strtotime($vip4Expired) - time()) / 86400));
+            $info['vip_4_day'] = max(0, ceil((strtotime($vip4Expired) - time()) / 86400));
             $info['is_video_vip'] = $isVideoVip;
             $info['video_vip_expired'] = $videoVipExpired;
-            $info['video_vip_day'] = max(0, intval((strtotime($videoVipExpired) - time()) / 86400));
+            $info['video_vip_day'] = max(0, ceil((strtotime($videoVipExpired) - time()) / 86400));
             RedisService::set($cacheKey, $info, rand(5, 10));
         }