(extra = {})
| 250 | } |
| 251 | |
| 252 | saveCache(extra = {}) { |
| 253 | const cache = readCache(); |
| 254 | cache[this.cacheKey] = { |
| 255 | ...(cache[this.cacheKey] || {}), |
| 256 | ...(this.openid ? { openid: this.openid } : {}), |
| 257 | ...(this.vipOpenid ? { vipOpenid: this.vipOpenid } : {}), |
| 258 | ...(this.unionid ? { unionid: this.unionid } : {}), |
| 259 | ...(this.token ? { token: this.token } : {}), |
| 260 | ...(this.userId ? { userId: this.userId } : {}), |
| 261 | marsCid: this.marsCid, |
| 262 | ...extra, |
| 263 | updatedAt: new Date().toISOString(), |
| 264 | }; |
| 265 | writeCache(cache); |
| 266 | } |
| 267 | |
| 268 | removeLoginCache() { |
| 269 | const cache = readCache(); |
no test coverage detected