diff --git a/app/controller/api/Consumer.php b/app/controller/api/Consumer.php index d2a66bb..5aeed0d 100644 --- a/app/controller/api/Consumer.php +++ b/app/controller/api/Consumer.php @@ -137,9 +137,9 @@ class Consumer extends Base $endTime = strtotime($item->end_time); if (($endTime - $time) < $weekTime) { $ExpirationTime = ($endTime - $time) / 86400; - $item->ExpirationTime = ceil($ExpirationTime); + $item->ExpirationTime = "还有" . ceil($ExpirationTime) . "到期"; } else { - $item->ExpirationTime = 0; + $item->ExpirationTime = ''; } }); diff --git a/app/controller/api/Coupon.php b/app/controller/api/Coupon.php index 6bea7f9..38cf832 100644 --- a/app/controller/api/Coupon.php +++ b/app/controller/api/Coupon.php @@ -115,9 +115,9 @@ class Coupon extends Base $endTime = strtotime($item->endTime); $ExpirationTime = abs(($endTime - $time) / 86400); if (($endTime > $time) ) { - $expirationStr = ceil($ExpirationTime)."天后到期"; + $expirationStr = "还有".ceil($ExpirationTime)."天过期期"; } else { - $expirationStr = "到期" . ceil($ExpirationTime) . "天"; + $expirationStr = "已过期" . ceil($ExpirationTime) . "天"; } $item->expirationStr =$expirationStr;