Compare commits
2 Commits
504c48c71c
...
325e9eac44
Author | SHA1 | Date |
---|---|---|
wangxinglong | 325e9eac44 | |
wangxinglong | c261f15207 |
|
@ -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 = '';
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -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;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue