修复兑换码截止时间错误 (#416)

This commit is contained in:
Ca(HCO₃)₂ 2024-05-04 20:59:46 +08:00 committed by GitHub
parent 1f3a22834e
commit 271c766f81
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 15 additions and 7 deletions

View File

@ -123,8 +123,16 @@ export class exchange extends plugin {
continue
}
let date = new Date(post.created_at * 1000)
if (this.uid == '80823548') {
date.setDate(date.getDate() + 1)
this.deadline = `${date.getFullYear()}-${date.getMonth() + 1}-${date.getDate()} 23:59:59`
} else if (this.uid == '73565430') {
date.setDate(date.getDate() + 5)
this.deadline = `${date.getFullYear()}-${date.getMonth() + 1}-${date.getDate()} 12:00:00`
} else {
date.setDate(date.getDate() + 3)
this.deadline = `${date.getFullYear()}-${date.getMonth() + 1}-${date.getDate()} 12:00:00`
}
let structured_content = post.structured_content
let result = structured_content.match(/{\"link\":\"https:\/\/webstatic.mihoyo.com\/bbs\/event\/live\/index.html\?act_id=(.*?)\\/)
if (result) {