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

Method saveCachedToken

wxapp/tmj.js:144–157  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

142 }
143
144 saveCachedToken() {
145 if (!this.token) return;
146 const cache = readTokenCache();
147 cache[this.openid] = {
148 token: this.token,
149 shopId: this.shopId,
150 shopName: this.shopName,
151 integralAccount: this.integralAccount,
152 signActivityId: this.signActivityId,
153 signTitle: this.signTitle,
154 updatedAt: new Date().toISOString(),
155 };
156 writeTokenCache(cache);
157 }
158
159 removeCachedToken() {
160 const cache = readTokenCache();

Callers 5

runMethod · 0.95
loginByWxCodeMethod · 0.95
ensureIntegralAccountMethod · 0.95
findSignActivityMethod · 0.95
loadSignInfoMethod · 0.95

Calls 2

readTokenCacheFunction · 0.70
writeTokenCacheFunction · 0.70

Tested by

no test coverage detected