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

Method main

xiaosatonglu.js:36–81  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

34 }
35
36 async main() {
37 $.log(`------开始${this.mobile}------`)
38 await this.getCode()
39 if (this.code !== null) {
40 await this.login()
41 if (this.accountId !== null && this.sessionId !== null) {
42 await this.user_info()
43 if (this.wxopenId !== "" && this.wxopenId !== null) {
44 await this.art_list(this.channelId[0]);
45 this.round = 1;
46 if (this.artList.length == 0) {
47 await this.art_list(this.channelId[1]);
48 this.round = 2;
49 }
50 if (this.artList.length == 0) {
51 await this.art_list(this.channelId[2]);
52 this.round = 3;
53 }
54
55 if (this.artList.length !== 0) {
56 this.num = this.artList.length
57 for (let artId of this.artList) {
58 await this.read_status(artId)
59 if (this.artReadStatus == true) {
60 console.log(`已阅读${artId}`)
61 await this.read_task(artId)
62 } else if (this.artReadStatus == false) {
63 console.log(`未阅读${artId}`)
64 await this.do_read(artId)
65 await $.wait(5000)
66 await this.read_task(artId)
67 }
68 }
69 await this.lottery_num()
70 }
71
72 } else {
73 $.log(`未绑定微信`)
74 }
75 //await this.lottery_task()
76
77 }
78 }
79
80
81 }
82 async getCode() {
83 try {
84 let options = {

Callers 1

startFunction · 0.45

Calls 10

getCodeMethod · 0.95
loginMethod · 0.95
user_infoMethod · 0.95
art_listMethod · 0.95
read_statusMethod · 0.95
read_taskMethod · 0.95
do_readMethod · 0.95
lottery_numMethod · 0.95
logMethod · 0.45
waitMethod · 0.45

Tested by

no test coverage detected