MCPcopy Create free account
hub / github.com/smallfawn/QLScriptPublic / saveCachedToken

Method saveCachedToken

wxapp/gyjj.js:115–126  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

113 }
114
115 saveCachedToken() {
116 if (!this.token) return;
117 const cache = readTokenCache();
118 cache[this.cacheKey()] = {
119 token: this.token,
120 sessionKey: this.sessionKey,
121 userId: this.userId,
122 userInfo: this.userInfo,
123 updatedAt: new Date().toISOString(),
124 };
125 writeTokenCache(cache);
126 }
127
128 removeCachedToken() {
129 const cache = readTokenCache();

Callers 3

runMethod · 0.95
loginByWxCodeMethod · 0.95
accountMethod · 0.95

Calls 3

cacheKeyMethod · 0.95
readTokenCacheFunction · 0.70
writeTokenCacheFunction · 0.70

Tested by

no test coverage detected