()
| 104 | } |
| 105 | |
| 106 | saveCachedToken() { |
| 107 | if (!this.token) return; |
| 108 | const cache = readTokenCache(); |
| 109 | cache[this.openid] = { |
| 110 | token: this.token, |
| 111 | user: this.user, |
| 112 | wxInfo: this.wxInfo, |
| 113 | updatedAt: new Date().toISOString(), |
| 114 | }; |
| 115 | writeTokenCache(cache); |
| 116 | } |
| 117 | |
| 118 | removeCachedToken() { |
| 119 | const cache = readTokenCache(); |
no test coverage detected