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

Method getJob

wxapp/musi.js:149–180  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

147 }
148
149 async getJob() {
150 try {
151 const timestamp = new Date().getTime();
152 let options = {
153 method: "POST",
154 url: `https://atom.musiyoujia.com/member/memberbehavior/getBehaviorInfos`,
155 headers: {
156 'Content-Type': 'application/json',
157 'User-Agent': defaultUserAgent,
158 "api_client_code": "65",
159 "api_version": "1.0.0",
160 'api_token': this.activedAuthToken,
161
162 'api_timestamp': timestamp,
163 'api_sign': this.MD5_Encrypt(`api_token=${this.activedAuthToken}&api_client_code=65&api_version=1.0.0&api_timestamp=${timestamp}`)?.toUpperCase()
164
165 },
166 data: { "appId": "wx03527497c5369a2c", "appType": "WECHAT_MINI_PROGRAM", "behaviorIds": [1, 2, 10203, 10204, 10205, 5], "sourceChannel": "会员小程序", "source": `${this.customId}`, "openId": `${this.openId}` }
167 }
168 let { data: result } = await axios.request(options)
169
170 if (result?.msg === "success") {
171 this.isSigned = result?.data[0].acts['每天已获得积分次数'] === 1;
172 $.log(`账号[${this.index}] 获取任务列表成功,${this.isSigned ? '已签到' : '未签到'}`)
173 } else {
174 $.log(`账号[${this.index}] 获取任务列表失败:${result?.msg || JSON.stringify(result)}`)
175 }
176
177 } catch (e) {
178 console.log(e)
179 }
180 }
181
182 async doSign() {
183 try {

Callers 1

runMethod · 0.95

Calls 4

MD5_EncryptMethod · 0.95
getTimeMethod · 0.80
requestMethod · 0.45
logMethod · 0.45

Tested by

no test coverage detected