Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Modifying a ticket is never valid #52

Merged
merged 1 commit into from
Apr 21, 2024
Merged

Conversation

taixw2
Copy link
Contributor

@taixw2 taixw2 commented May 12, 2021

在缓存的 JSON 中没有 access_token, 在 JsTicket.ts 中使用的是 ticket

constructor(json: string) {
this.json = json
let ticket = JSON.parse(json)
this.ticket = ticket.ticket
this.expires_in = ticket.expires_in
this.errcode = ticket.errcode
this.errmsg = ticket.errmsg
if (this.expires_in) {
this.expired_time = new Date().getTime() + (this.expires_in - 9) * 1000
}
// 从缓存读取时还原
if (ticket.expired_time) {
this.expired_time = ticket.expired_time
}
}

在缓存的 JSON 中没有 access_token
@Javen205 Javen205 merged commit 810ecc3 into Javen205:master Apr 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants