|
@@ -47,7 +47,7 @@ const isAlert = () => {
|
|
|
const timeDifference = expired_date - now_date;
|
|
const timeDifference = expired_date - now_date;
|
|
|
|
|
|
|
|
// 3 天的时间(以毫秒为单位)
|
|
// 3 天的时间(以毫秒为单位)
|
|
|
- const threeDaysInMilliseconds = 1000 * 24 * 60 * 60 * 1000;
|
|
|
|
|
|
|
+ const threeDaysInMilliseconds = 3 * 24 * 60 * 60 * 1000;
|
|
|
const isWithinThreeDays = Math.abs(timeDifference) <= threeDaysInMilliseconds;
|
|
const isWithinThreeDays = Math.abs(timeDifference) <= threeDaysInMilliseconds;
|
|
|
console.log(expired_date, now_date, isWithinThreeDays);
|
|
console.log(expired_date, now_date, isWithinThreeDays);
|
|
|
return isWithinThreeDays;
|
|
return isWithinThreeDays;
|