()
| 95 | } |
| 96 | |
| 97 | saveCachedToken() { |
| 98 | if (!this.token) return; |
| 99 | const cache = readTokenCache(); |
| 100 | cache[this.openid] = { |
| 101 | accessToken: this.token, |
| 102 | redOpenId: this.redOpenId, |
| 103 | userId: this.userId, |
| 104 | mobile: this.user.mobile || "", |
| 105 | updatedAt: new Date().toISOString(), |
| 106 | }; |
| 107 | writeTokenCache(cache); |
| 108 | } |
| 109 | |
| 110 | removeCachedToken() { |
| 111 | const cache = readTokenCache(); |
no test coverage detected