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

Method getSignInId

daily/ddsy.js:68–103  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

66 return year + '-' + month + '-' + day
67 }
68 async getSignInId() {
69 const time = this.getTime()
70 const method = `ddky.promotion.signin.pageinfo`
71 const signDay = this.getSignDay()
72 const str = method +
73 `loginToken${this.token}` +
74 `method${method}` +
75 `platH5` +
76 `platformH5` +
77 `signDay${signDay}` +
78 `t${time}` +
79 `uDate${this.uDate}` +
80 `userId${this.userId}` +
81 `v1.0` +
82 `versionName4.9.0` +
83 `6C57AB91A1308E26B797F4CD382AC79D`
84 let sign = (this.getSign(str)).toUpperCase();
85 let callbackStr = new Date().getTime()
86 try {
87 let options = {
88 url: `https://hapi.ddky.com/mcp/weixin/rest.htm?sign=${sign}&loginToken=${this.token}&method=${method}&plat=H5&platform=H5&signDay=${signDay}&t=${time}&uDate=${this.uDate}&userId=${this.userId}&v=1.0&versionName=4.9.0&callback=Zepto${callbackStr}`,
89 headers: {},
90 }
91 let { data: response } = await axios.request(options);
92 let result = response.replace(`Zepto${callbackStr}`, "")
93 result = result.replaceAll("(", "")
94 result = result.replaceAll(")", "")
95 result = JSON.parse(result)
96 if (result.code = "0") {
97 await this.sign(result.result.signDayVo.signinId)
98 }
99
100 } catch (e) {
101 console.log(e);
102 }
103 }
104 async sign(signInId) {
105 let callbackStr = new Date().getTime()
106 const time = this.getTime()

Callers 1

runMethod · 0.95

Calls 6

getTimeMethod · 0.95
getSignDayMethod · 0.95
getSignMethod · 0.95
signMethod · 0.95
requestMethod · 0.45
logMethod · 0.45

Tested by

no test coverage detected