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

Method saveCachedToken

wxapp/nice.js:126–136  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

124 }
125
126 saveCachedToken() {
127 if (!this.token) return;
128 const cache = readTokenCache();
129 cache[this.openid] = {
130 token: this.token,
131 memberId: this.memberId,
132 phone: this.phone,
133 updatedAt: new Date().toISOString(),
134 };
135 writeTokenCache(cache);
136 }
137
138 removeCachedToken() {
139 const cache = readTokenCache();

Callers 2

loginByWxCodeMethod · 0.95
getUserMethod · 0.95

Calls 2

readTokenCacheFunction · 0.70
writeTokenCacheFunction · 0.70

Tested by

no test coverage detected