Merge pull request #48 from YangMieMie0326/dev

修复恋爱墙倒计时获取本地时间时报错。
This commit is contained in:
宏尘 2025-02-10 20:29:55 +08:00 committed by GitHub
commit d6e7234395
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -390,7 +390,7 @@ const commonContext = {
} }
const grt = new Date(loveTime) const grt = new Date(loveTime)
setInterval(function () { setInterval(function () {
let now = Date.now() let now = new Date(Date.now())
let difference = parseInt((now - grt) / 1000) let difference = parseInt((now - grt) / 1000)
let seconds = difference % 60 let seconds = difference % 60
difference = parseInt(difference / 60) difference = parseInt(difference / 60)
@ -654,4 +654,4 @@ let timeLifeHour = -1
omits.forEach((c) => commonContext[c] && commonContext[c]()) omits.forEach((c) => commonContext[c] && commonContext[c]())
$('html').addClass('ready') $('html').addClass('ready')
}) })
})() })()