Преглед изворни кода

美博会时间格式兼容

喻文俊 пре 3 година
родитељ
комит
1d806477ed
1 измењених фајлова са 2 додато и 2 уклоњено
  1. 2 2
      src/main/resources/static/js/activity/beautyTopic.js

+ 2 - 2
src/main/resources/static/js/activity/beautyTopic.js

@@ -142,8 +142,8 @@ var activeApp = (function () {
             // 初始化红包入口状态
             initActivityEntry: function initActivityEntry(begin, end) {
                 const nowTime = new Date().getTime();
-                const beginTime = new Date(begin).getTime();
-                const endTime = new Date(end).getTime();
+                const beginTime = new Date(begin.replace(/-/g, '/')).getTime();
+                const endTime = new Date(end.replace(/-/g, '/')).getTime();
                 return nowTime >= beginTime && nowTime <= endTime
             }
             ,