浏览代码

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

hanyang 1 年之前
父节点
当前提交
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;