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

Method saveCachedToken

wxapp/niuniuduanju.js:106–116  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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();

Callers 1

loginByWxCodeMethod · 0.95

Calls 2

readTokenCacheFunction · 0.70
writeTokenCacheFunction · 0.70

Tested by

no test coverage detected