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 +} 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" } } ] 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);