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

Function start

qtx.js:31–69  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

29//---------------------------------------------------------
30
31async function start() {
32 //await getNotice()
33 console.log('\n============= 用户CK有效性验证 =============\n');
34 taskall = [];
35 for (let user of userList) {
36 console.log(`随机延迟${user.getRandomTime()}ms`);
37 taskall.push(await user.user_info());
38 await $.wait(user.getRandomTime()); //延迟 1秒 可充分利用 $.环境函数
39 }
40 await Promise.all(taskall);
41 console.log('\n================== 任务 ==================\n');
42 taskall = [];
43 for (let user of userList) {
44 if (user.ckStatus) {
45 console.log(`随机延迟${user.getRandomTime()}ms`);
46 taskall.push(await user.task_signIn());
47 await $.wait(user.getRandomTime());
48 taskall.push(await user.get_question());
49 await $.wait(user.getRandomTime());
50 taskall.push(await user.do_question());
51 await $.wait(user.getRandomTime());
52 taskall.push(await user.get_cal());
53 await $.wait(user.getRandomTime());
54 if (user.calIdArr.length !== 0) {
55 console.log(`未收取精力列表${user.calIdArr}`);
56 }
57 for (let l = 0; l < user.calIdArr.length; l++) {
58 taskall.push(await user.do_cal(user.calIdArr[l]));
59 await $.wait(user.getRandomTime());
60 }
61
62 }
63 }
64 await Promise.all(taskall);
65
66
67
68
69}
70
71
72class UserInfo {

Callers 1

qtx.jsFile · 0.70

Calls 9

task_signInMethod · 0.80
get_questionMethod · 0.80
do_questionMethod · 0.80
get_calMethod · 0.80
do_calMethod · 0.80
logMethod · 0.45
getRandomTimeMethod · 0.45
user_infoMethod · 0.45
waitMethod · 0.45

Tested by

no test coverage detected