From 8e1b4d2cd296236c3f493526007b9eacb709aa2d Mon Sep 17 00:00:00 2001 From: Leaf <444653703@qq.com> Date: Sat, 13 Nov 2021 09:34:18 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E5=8A=A0=E5=85=A5=E9=87=8D=E8=AF=95?= =?UTF-8?q?=E6=9C=BA=E5=88=B6=E9=98=B2=E6=AD=A2=E6=9C=8D=E5=8A=A1=E5=99=A8?= =?UTF-8?q?=E5=8D=A1=EF=BC=8C=E5=8A=A0=E5=85=A5=E8=87=AA=E5=8A=A8=E8=BD=AC?= =?UTF-8?q?=E6=8D=A2=E7=BA=A2=E5=8C=85=E4=BD=99=E9=A2=9D=E5=BC=80=E5=85=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- shangtuo.js | 35 ++++++++++++++++++++++++++++++----- 1 file changed, 30 insertions(+), 5 deletions(-) diff --git a/shangtuo.js b/shangtuo.js index 41664f4..0d30a36 100644 --- a/shangtuo.js +++ b/shangtuo.js @@ -19,6 +19,8 @@ https://raw.githubusercontent.com/leafxcy/JavaScript/main/shangtuo.jpg 脚本默认红包余额满0.5自动提现,可以自己新建一个环境变量 stCash 设定红包余额提现金额,export stCash=20 !!!但是不建议提现20块以下,因为手续费高,只有0.5手续费低!!! +脚本会自动把红包余额转换为消费余额来抢更高面额的券,如果不想换的自己建一个环境变量 stExchange 设为0,export stExchange=0 + CK有效期较短,可能几天后需要重新捉 只测试了IOS,测试过V2P,青龙可以跑 @@ -56,6 +58,7 @@ let userNum = 0 let userInfo = "" var packWithdrawAmount = ($.isNode() ? (process.env.stCash) : ($.getval('stCash'))) || 0.5; +var autoExchange = ($.isNode() ? (process.env.stExchange) : ($.getval('stExchange'))) || 1; let secretCode @@ -65,6 +68,9 @@ let grabCount let getBondListFlag let quanList +let retryLimit = 5 +let retryTime + let logDebug = 0 let logCaller = 0 @@ -95,8 +101,11 @@ const notify = $.isNode() ? require('./sendNotify') : ''; if(accountStatus) { //看广告得分红金 + retryTime = 0 await getAdvertPage(1); await $.wait(1000); + await getAdvertPage(2); + await $.wait(1000); //提取分红金 await changeDividendBonusToBalance(); @@ -292,6 +301,7 @@ function getUserInfoData(checkStatus,timeout = 0) { //广告列表id function getAdvertPage(pageNo,timeout = 0) { if(logCaller) console.log("call "+ printCaller()) + retryTime++ return new Promise((resolve) => { let request = { url: `https://api.shatuvip.com/advert/getAdvertPage?type=1&pageNo=${pageNo}&column_id=1`, @@ -314,6 +324,9 @@ function getAdvertPage(pageNo,timeout = 0) { if (err) { console.log("API请求失败"); console.log(err + " at function " + printCaller()); + if(retryTime < retryLimit) { + await getAdvertPage(pageNo) + } } else { if (safeGet(data)) { let result = JSON.parse(data) @@ -323,7 +336,6 @@ function getAdvertPage(pageNo,timeout = 0) { adNum = result.result.length compTaskFlag = 1 for(let i=0; i= 88) { console.log(`\n分红金余额:${result.result.balance},开始尝试提现`) + retryTime = 0 await getBalanceWithdrawalData(0,result.result.balance) } else { console.log(`\n分红金余额:${result.result.balance},不执行提现`) @@ -1096,6 +1109,7 @@ function getPopularizeBalance(timeout = 0) { await $.wait(1000); if(result.result.balance >= 1) { console.log(`\n推广余额:${result.result.balance},开始尝试提现`) + retryTime = 0 await getBalanceWithdrawalData(2,result.result.balance) } else { console.log(`\n推广余额:${result.result.balance},不执行提现`) @@ -1147,12 +1161,19 @@ function getPackBalance(move,timeout = 0) { if(result.code == 0) { await $.wait(1000); if(move == 0) { - if(result.result.balance > 0) { - console.log(``) - await balancePackChangeBalance(result.result.balance) + if(autoExchange >0) { + console.log(`\n您当前设置为自动转换消费余额`) + if(result.result.balance > 0.5) { + await balancePackChangeBalance(result.result.balance-0.5) + } else { + console.log(`\n红包余额${result.result.balance},少于0.5,不转换消费余额`) + } + } else { + console.log(`\n您当前设置为不转换消费余额`) } } else { if(result.result.balance >= packWithdrawAmount) { + retryTime = 0 console.log(`\n红包余额${result.result.balance},尝试为你提现${packWithdrawAmount}`) await getBalanceWithdrawalData(1,result.result.balance,packWithdrawAmount) } else { @@ -1341,6 +1362,7 @@ function queryWithdrawId(id,balance,timeout = 0) { //提现 function balanceWithdrawal(id,withdrawMoney,timeout = 0) { if(logCaller) console.log("call "+ printCaller()) + retryTime++ return new Promise((resolve, reject) => { let request = { url: `https://api.shatuvip.com/withdrawal/balanceWithdrawal`, @@ -1364,6 +1386,9 @@ function balanceWithdrawal(id,withdrawMoney,timeout = 0) { if (err) { console.log("API请求失败"); console.log(err + " at function " + printCaller()); + if(retryTime < retryLimit) { + await balanceWithdrawal(id,withdrawMoney) + } } else { if (safeGet(data)) { await $.wait(1000); From 210deb316e9772e576889b8d136158a83504e017 Mon Sep 17 00:00:00 2001 From: Leaf <444653703@qq.com> Date: Sat, 13 Nov 2021 20:24:25 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=BF=9C=E7=A8=8B?= =?UTF-8?q?=E5=9C=B0=E5=9D=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jctq/jctq_task_subscribe.json | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/jctq/jctq_task_subscribe.json b/jctq/jctq_task_subscribe.json index 1e27df5..3817bc2 100644 --- a/jctq/jctq_task_subscribe.json +++ b/jctq/jctq_task_subscribe.json @@ -10,7 +10,7 @@ "time": "21 8,20 * * *", "job": { "type": "runjs", - "target": "jctqkkz.js" + "target": "https://raw.githubusercontent.com/leafxcy/JavaScript/main/jctq/jctqkkz.js" } }, { @@ -19,7 +19,7 @@ "time": "18 22 * * *", "job": { "type": "runjs", - "target": "jctq_today_score.js" + "target": "https://raw.githubusercontent.com/leafxcy/JavaScript/main/jctq/jctq_today_score.js" } }, { @@ -28,7 +28,7 @@ "time": "23 0,6 * * *", "job": { "type": "runjs", - "target": "jctqqd.js" + "target": "https://raw.githubusercontent.com/leafxcy/JavaScript/main/jctq/jctqqd.js" } }, { @@ -37,7 +37,7 @@ "time": "12 7,19 * * *", "job": { "type": "runjs", - "target": "jctqwz.js" + "target": "https://raw.githubusercontent.com/leafxcy/JavaScript/main/jctq/jctqwz.js" } }, { @@ -46,7 +46,7 @@ "time": "12 6,12,18 * * *", "job": { "type": "runjs", - "target": "jctq_share.js" + "target": "https://raw.githubusercontent.com/leafxcy/JavaScript/main/jctq/jctq_share.js" } }, { @@ -55,7 +55,7 @@ "time": "20 9,17 * * *", "job": { "type": "runjs", - "target": "jctq_Adv_video.js" + "target": "https://raw.githubusercontent.com/leafxcy/JavaScript/main/jctq/jctq_Adv_video.js" } }, { @@ -64,7 +64,7 @@ "time": "31 8,16 * * *", "job": { "type": "runjs", - "target": "jctq_Rotary.js" + "target": "https://raw.githubusercontent.com/leafxcy/JavaScript/main/jctq/jctq_Rotary.js" } }, { @@ -73,7 +73,7 @@ "time": "24 21,22 * * *", "job": { "type": "runjs", - "target": "jctqbox.js" + "target": "https://raw.githubusercontent.com/leafxcy/JavaScript/main/jctq/jctqbox.js" } }, { @@ -82,7 +82,7 @@ "time": "32 2,6,20 * * *", "job": { "type": "runjs", - "target": "jctq_friendSign.js" + "target": "https://raw.githubusercontent.com/leafxcy/JavaScript/main/jctq/jctq_friendSign.js" } }, { @@ -91,7 +91,7 @@ "time": "34 23 * * *", "job": { "type": "runjs", - "target": "jctq_withdraw.js" + "target": "https://raw.githubusercontent.com/leafxcy/JavaScript/main/jctq/jctq_withdraw.js" } } ] From 56c462f09c3cef4a9e63175353e64f2bdfd3c1ae Mon Sep 17 00:00:00 2001 From: Leaf <444653703@qq.com> Date: Sat, 13 Nov 2021 22:01:57 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E4=BB=BB=E5=8A=A1?= =?UTF-8?q?=E5=90=8D=E7=A7=B0=EF=BC=8C=E9=81=BF=E5=85=8D=E8=B7=9F=E7=9C=8B?= =?UTF-8?q?=E7=82=B9=E9=87=8D=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jctq/jctq_rewrite_subscribe.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/jctq/jctq_rewrite_subscribe.json b/jctq/jctq_rewrite_subscribe.json index c83c209..d0888f5 100644 --- a/jctq/jctq_rewrite_subscribe.json +++ b/jctq/jctq_rewrite_subscribe.json @@ -107,7 +107,7 @@ }, }, { - "name": "晶彩抽奖", + "name": "晶彩天气抽奖", "type": "cron", "time": "31 8,16 * * *", "job": { @@ -116,7 +116,7 @@ }, }, { - "name": "晶彩每日宝箱", + "name": "晶彩天气每日宝箱", "type": "cron", "time": "24 21,22 * * *", "job": { @@ -125,7 +125,7 @@ }, }, { - "name": "晶彩好友签到红包", + "name": "晶彩天气好友红包", "type": "cron", "time": "32 2,6,20 * * *", "job": { @@ -144,4 +144,4 @@ } ] } -} \ No newline at end of file +}