(extra = {})
| 311 | } |
| 312 | |
| 313 | saveCache(extra = {}) { |
| 314 | const cache = readCache(); |
| 315 | cache[this.cacheKey] = { |
| 316 | ...(cache[this.cacheKey] || {}), |
| 317 | ...(this.openid ? { openid: this.openid } : {}), |
| 318 | ...(this.customerId ? { customerId: this.customerId } : {}), |
| 319 | ...(this.accessToken ? { accessToken: this.accessToken } : {}), |
| 320 | ...(this.refreshToken ? { refreshToken: this.refreshToken } : {}), |
| 321 | ...(this.loginKey ? { loginKey: this.loginKey } : {}), |
| 322 | ...(this.phone ? { phone: this.phone } : {}), |
| 323 | ...extra, |
| 324 | updatedAt: new Date().toISOString(), |
| 325 | }; |
| 326 | writeCache(cache); |
| 327 | } |
| 328 | |
| 329 | removeToken() { |
| 330 | const cache = readCache(); |
no test coverage detected