(extra = {})
| 202 | } |
| 203 | |
| 204 | saveCache(extra = {}) { |
| 205 | const cache = readCache(); |
| 206 | cache[this.cacheKey] = { |
| 207 | ...(cache[this.cacheKey] || {}), |
| 208 | ...(this.openid ? { openid: this.openid } : {}), |
| 209 | ...(this.ticket ? { ticket: this.ticket } : {}), |
| 210 | ...(this.duid ? { duid: this.duid } : {}), |
| 211 | ...(this.udl ? { udl: this.udl } : {}), |
| 212 | ...(this.uid ? { uid: this.uid } : {}), |
| 213 | ...extra, |
| 214 | updatedAt: new Date().toISOString(), |
| 215 | }; |
| 216 | writeCache(cache); |
| 217 | } |
| 218 | |
| 219 | removeTicket() { |
| 220 | const cache = readCache(); |
no test coverage detected