服务到期

This commit is contained in:
邓皓元 2019-04-22 14:32:47 +08:00
parent f82ca6d302
commit bf4868e874

View File

@ -124,7 +124,7 @@ class CardService extends Service
return 4;
}
if ($card['service_end_at'] && strtotime($card['service_end_at']) < time()) {
if ($card['service_end_at'] && $card['service_end_at'] < date('Y-m')) {
return 3;
}
@ -132,7 +132,7 @@ class CardService extends Service
return 2;
}
if (Carbon::parse($card['created_at'])->diffInMonths(Carbon::now())<= 6) {
if (Carbon::parse($card['created_at'])->diffInMonths(Carbon::now()) <= 6) {
return 1;
}