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

Method saveCachedToken

wxapp/yz9d.js:99–112  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

97 }
98
99 saveCachedToken() {
100 if (!this.token) return;
101 const cache = readTokenCache();
102 cache[this.openid] = {
103 accessToken: this.token,
104 sessionId: this.sessionId,
105 kdtId: this.kdtId,
106 cookie: this.cookie,
107 mobile: this.userInfo.mobile || "",
108 nickName: this.userInfo.nick_name || this.userInfo.nickName || "",
109 updatedAt: new Date().toISOString(),
110 };
111 writeTokenCache(cache);
112 }
113
114 removeCachedToken() {
115 const cache = readTokenCache();

Callers 1

loginByWxCodeMethod · 0.95

Calls 2

readTokenCacheFunction · 0.70
writeTokenCacheFunction · 0.70

Tested by

no test coverage detected