Просмотр исходного кода

fix:修改激活时间小于3天显示激活提示

hanyang 1 год назад
Родитель
Сommit
ae6482617a
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      src/views/layout/ContentContainer.vue

+ 1 - 1
src/views/layout/ContentContainer.vue

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