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

Method run

wxapp/nwdjg.js:49–64  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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

Callers 1

nwdjg.jsFile · 0.45

Calls 6

getUserTokenMethod · 0.95
getUserInfoMethod · 0.95
doSignMethod · 0.95
waitMethod · 0.45
getCodeMethod · 0.45
logMethod · 0.45

Tested by

no test coverage detected