(silent = false)
| 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); |
no test coverage detected