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

Method saveToken

wxapp/jingjianx_all.js:361–375  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

359 }
360
361 saveToken() {
362 if (!this.token) return;
363 const cache = readCache();
364 cache[this.cacheKey()] = {
365 token: this.token,
366 isMember: this.isMember,
367 member: this.member,
368 shopId: this.shop.shopId,
369 shopName: this.loginShopName || this.shop.shopName,
370 appid: this.app.appid,
371 appName: this.app.name,
372 updatedAt: new Date().toISOString(),
373 };
374 writeCache(cache);
375 }
376
377 clearToken() {
378 const cache = readCache();

Callers 1

loginMethod · 0.95

Calls 3

cacheKeyMethod · 0.95
readCacheFunction · 0.70
writeCacheFunction · 0.70

Tested by

no test coverage detected