()
| 251 | } |
| 252 | |
| 253 | saveCachedToken() { |
| 254 | if (!this.token) return; |
| 255 | const cache = readTokenCache(); |
| 256 | cache[this.cacheKey()] = { |
| 257 | token: this.token, |
| 258 | openId: this.openId, |
| 259 | mallCode: this.mallCode, |
| 260 | h5Prefix: this.h5Prefix, |
| 261 | customerName: this.customerName, |
| 262 | appid: this.app.appid, |
| 263 | appName: this.app.name, |
| 264 | updatedAt: new Date().toISOString(), |
| 265 | }; |
| 266 | writeTokenCache(cache); |
| 267 | } |
| 268 | |
| 269 | removeCachedToken() { |
| 270 | const cache = readTokenCache(); |
no test coverage detected