From 7cdbdb8efe73dc600a096e6db80a325b0789f228 Mon Sep 17 00:00:00 2001 From: haptear Date: Tue, 31 May 2022 17:35:23 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B7=9F=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dati.js | 52 ++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 36 insertions(+), 16 deletions(-) diff --git a/dati.js b/dati.js index f387a1e..34c49db 100644 --- a/dati.js +++ b/dati.js @@ -13,10 +13,9 @@ const notifyFlag =($.isNode() ? process.env.fknotify : $.getdata('fknotify'))|| let tsxx='',tsflag=0 //推送信息 // token 数据 let dtsign = ($.isNode() ? process.env.dtsign : $.getdata('dtsign')); -let dtsignArr=[ -'68331' -] +let dtsignArr=[] +//'68331','70733', '70734' let amount=0,userid,txflag=0,imei @@ -27,20 +26,23 @@ let amount=0,userid,txflag=0,imei }else { if(!(await checkEnv())) return; - for (userid of dtsignArr){ - console.log(`\n=====开始用户:${userid} 每次刷满5000====`) - await updateInfo(userid) - await $.wait(200) - - if (amount>3000){ + for (userid of dtsignArr) { + console.log(`\n=====开始用户:${userid} 每次刷满5000====`) + await updateInfo(userid) + await $.wait(200) - console.log(`开始抽奖卷`) - txflag=0 - await onCheck(userid) - }else await updateRedCoupons(userid) - - //break - } + if (amount < 3000) { + await updateRedCoupons(userid) + } + + if (amount > 3000) { + console.log(`开始抽奖卷`) + txflag = 0 + await onCheck(userid) + } + + //break + } console.log(`等待3分钟开始查看提现记录`) await $.wait(100000) for (userid of dtsignArr){ @@ -265,6 +267,24 @@ async function Check(userid) { }else console.log(`${JSON.stringify(result)}`) } +async function updatealipay(userid) { + let url = 'http://cpl.apkgo.cn/idiomgame/?s=/UserInfo/updateAlipay' +let timestamp= + new Date() +let newname=encodeURIComponent(accname) +let str=account+accname +let sign=encrypt(str,timestamp,userid) +let body=`&userId=${userid}&account=${account}&name=${newname}&timeStamp=${timestamp}&sign=${sign}` + let urlObject = populateUrlObject(url,body) + await httpRequest('post',urlObject) +if(!httpResult || httpResult.statusCode != 200) {return;} +let result = JSON.parse(httpResult.body); + if(!result) return + console.log(`${JSON.stringify(result)}`) + if(result.code == 0) { +//console.log(`绑定:result.msg`); +}else console.log(`${JSON.stringify(result)}`) +} + ///////////////////////////////// function populateUrlObject(url,body=''){ let host = url.replace('//','/').split('/')[1]