()
| 359 | } |
| 360 | |
| 361 | saveToken() { |
| 362 | if (!this.token) return; |
| 363 | const cache = readCache(); |
| 364 | cache[this.cacheKey()] = { |
| 365 | token: this.token, |
| 366 | isMember: this.isMember, |
| 367 | member: this.member, |
| 368 | shopId: this.shop.shopId, |
| 369 | shopName: this.loginShopName || this.shop.shopName, |
| 370 | appid: this.app.appid, |
| 371 | appName: this.app.name, |
| 372 | updatedAt: new Date().toISOString(), |
| 373 | }; |
| 374 | writeCache(cache); |
| 375 | } |
| 376 | |
| 377 | clearToken() { |
| 378 | const cache = readCache(); |
no test coverage detected