MCPcopy Index your code
hub / github.com/smallfawn/QLScriptPublic / saveCachedToken

Method saveCachedToken

wxapp/wb.js:136–149  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

134 }
135
136 saveCachedToken() {
137 if (!this.token) return;
138 const cache = readTokenCache();
139 cache[this.openid] = {
140 token: this.token,
141 appOpenid: this.appOpenid,
142 userId: this.userId,
143 userType: this.userType,
144 mobile: this.mobile,
145 currentJf: this.currentJf,
146 updatedAt: new Date().toISOString(),
147 };
148 writeTokenCache(cache);
149 }
150
151 removeCachedToken() {
152 const cache = readTokenCache();

Callers 3

runMethod · 0.95
loginByWxCodeMethod · 0.95
getUserMethod · 0.95

Calls 2

readTokenCacheFunction · 0.70
writeTokenCacheFunction · 0.70

Tested by

no test coverage detected