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

Method getCampaignId

wxapp/casetify.js:209–220  ·  view source on GitHub ↗
(silent = false)

Source from the content-addressed store, hash-verified

207 }
208
209 async getCampaignId(silent = false) {
210 if (this.campaignId) return this.campaignId;
211 const result = await this.request("GET", "estore-campaign/campaign/info/get", {
212 campaignType: POINT_MALL_TYPE,
213 });
214 const campaignId = result.data?.detail?.campaignId || result.data?.campaignId || "";
215 if (!campaignId) throw new Error("未找到积分商城活动");
216 this.campaignId = campaignId;
217 this.saveCachedToken();
218 if (!silent) $.log(`账号[${this.index}] 积分商城活动: ${campaignId}`);
219 return campaignId;
220 }
221
222 async getSignInfo() {
223 if (!this.campaignId) await this.getCampaignId(true);

Callers 3

runMethod · 0.95
checkTokenMethod · 0.95
getSignInfoMethod · 0.95

Calls 3

requestMethod · 0.95
saveCachedTokenMethod · 0.95
logMethod · 0.45

Tested by

no test coverage detected