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

Method doSign

wxapp/musi.js:182–212  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

180 }
181
182 async doSign() {
183 try {
184 const timestamp = new Date().getTime();
185 const eventAttr2 = $.time('yyyy.MM.dd')
186 let options = {
187 method: 'POST',
188 url: `https://atom.musiyoujia.com/member/memberbehavior/add`,
189 headers: {
190 'Content-Type': 'application/json',
191 'User-Agent': defaultUserAgent,
192 "api_client_code": "65",
193 'api_token': this.activedAuthToken,
194 "api_version": "1.0.0",
195 'api_timestamp': timestamp,
196 'api_sign': this.MD5_Encrypt(`api_token=${this.activedAuthToken}&api_client_code=65&api_version=1.0.0&api_timestamp=${timestamp}`)?.toUpperCase()
197
198 },
199 data: { "appId": "wx03527497c5369a2c", "appType": "WECHAT_MINI_PROGRAM", "osType": "windows", "model": "microsoft", "browser": "微信小程序", "platform": "1", "sourceType": "5", "sourceChannel": "会员小程序", "siteId": "", "visitorId": "", "deviceId": "", "spotId": "", "campaignId": "", "deviceType": "", "eventLabel": "", "eventValue": "", "eventAttr2": `${eventAttr2}`, "eventAttr3": "", "eventAttr4": "", "eventAttr5": "", "eventAttr6": "", "googleCampaignName": "", "googleCampaignSource": "", "googleCampaignMedium": "", "googleCampaignContent": "", "memberType": "DeRUCCI", "customId": `${this.customId}`, "locationUrl": "/pages/user/signIn", "url": "/pages/user/signIn", "pageTitle": "每日签到", "logType": "event", "behaviorIds": [1, 3], "eventCategory": "用户签到", "eventAction": "签到", "eventAttr1": 2, "openId": `${this.openId}` }
200 }
201 let { data: result } = await axios.request(options)
202
203 if (result?.msg === "success") {
204 $.log(`账号[${this.index}] 签到成功,获得积分:${result?.data?.point}`)
205 } else {
206 $.log(`账号[${this.index}] 签到失败:${result?.msg || JSON.stringify(result)}`)
207 }
208
209 } catch (e) {
210 console.log(e)
211 }
212 }
213
214
215

Callers 1

runMethod · 0.95

Calls 5

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

Tested by

no test coverage detected