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

Method run

wxapp/guyu.js:51–64  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

49 }
50
51 async run() {
52 //随机延迟5-30s 模拟人工操作
53 await $.wait(Math.floor(Math.random() * 20 + 5) * 1000);
54 let { data: codeRes } = await wechat.getCode(this.wcsid)
55 if (codeRes.status) {
56 await this.getUserToken(codeRes.data.code)
57 }
58 if (!this.token) {
59 $.log(`账号[${this.index}] 获取用户Token失败❌`)
60 return
61 }
62 await this.signIn()
63 await this.getUserPoints()
64 }
65 async getUserToken(code) {
66 let data = JSON.stringify({
67 "code": "" + code,

Callers 1

guyu.jsFile · 0.45

Calls 6

getUserTokenMethod · 0.95
signInMethod · 0.95
getUserPointsMethod · 0.95
waitMethod · 0.45
getCodeMethod · 0.45
logMethod · 0.45

Tested by

no test coverage detected