Compare commits

...

2 Commits

Author SHA1 Message Date
wangxinglong 325e9eac44 settter 2021-12-20 10:34:24 +08:00
wangxinglong c261f15207 setter 2021-12-20 10:34:00 +08:00
2 changed files with 4 additions and 4 deletions

View File

@ -137,9 +137,9 @@ class Consumer extends Base
$endTime = strtotime($item->end_time); $endTime = strtotime($item->end_time);
if (($endTime - $time) < $weekTime) { if (($endTime - $time) < $weekTime) {
$ExpirationTime = ($endTime - $time) / 86400; $ExpirationTime = ($endTime - $time) / 86400;
$item->ExpirationTime = ceil($ExpirationTime); $item->expirationTimeStr = "还有" . ceil($ExpirationTime) . "到期";
} else { } else {
$item->ExpirationTime = 0; $item->expirationTimeStr = '';
} }
}); });

View File

@ -115,9 +115,9 @@ class Coupon extends Base
$endTime = strtotime($item->endTime); $endTime = strtotime($item->endTime);
$ExpirationTime = abs(($endTime - $time) / 86400); $ExpirationTime = abs(($endTime - $time) / 86400);
if (($endTime > $time) ) { if (($endTime > $time) ) {
$expirationStr = ceil($ExpirationTime)."后到"; $expirationStr = "还有".ceil($ExpirationTime)."过期";
} else { } else {
$expirationStr = "" . ceil($ExpirationTime) . ""; $expirationStr = "已过" . ceil($ExpirationTime) . "";
} }
$item->expirationStr =$expirationStr; $item->expirationStr =$expirationStr;