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

Method saveCachedToken

wxapp/yz19.js:103–116  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

101 }
102
103 saveCachedToken() {
104 if (!this.token) return;
105 const cache = readTokenCache();
106 cache[this.openid] = {
107 accessToken: this.token,
108 sessionId: this.sessionId,
109 kdtId: this.kdtId,
110 cookie: this.cookie,
111 mobile: this.userInfo.mobile || "",
112 nickName: this.userInfo.nick_name || this.userInfo.nickName || "",
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