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

Method ensureIntegralAccount

wxapp/tmj.js:262–273  ·  view source on GitHub ↗
(silent = false)

Source from the content-addressed store, hash-verified

260 }
261
262 async ensureIntegralAccount(silent = false) {
263 const data = await this.request("/activity/common/queryIntegralSystemList", {
264 shopId: this.shopId,
265 earnSpendType: 1,
266 });
267 const first = Array.isArray(data) ? data[0] : null;
268 this.integralAccount = first?.integralAccount || this.integralAccount;
269 if (!silent) {
270 $.log(`账号[${this.index}] 积分体系: ${first?.systemName || "未知"} ${first?.integralAlias || ""}`);
271 }
272 this.saveCachedToken();
273 }
274
275 async findSignActivity() {
276 if (!this.integralAccount) await this.ensureIntegralAccount(true);

Callers 3

runMethod · 0.95
checkTokenMethod · 0.95
findSignActivityMethod · 0.95

Calls 3

requestMethod · 0.95
saveCachedTokenMethod · 0.95
logMethod · 0.45

Tested by

no test coverage detected