|
@@ -123,7 +123,7 @@ let gRetBody;
|
|
|
async function Main() {
|
|
async function Main() {
|
|
|
if (magicJS.isRequest) {
|
|
if (magicJS.isRequest) {
|
|
|
checkHandleRequest();
|
|
checkHandleRequest();
|
|
|
- }else{
|
|
|
|
|
|
|
+ } else {
|
|
|
gHost = magicJS.data.read('168_PksPlanAPIHost', 'e7i.16890269.com');
|
|
gHost = magicJS.data.read('168_PksPlanAPIHost', 'e7i.16890269.com');
|
|
|
gCommonHeaders.Host = gHost;
|
|
gCommonHeaders.Host = gHost;
|
|
|
gCommonHeaders.Referer = `https://${gHost}/v1/html/buy_plan/buy_plan.html`;
|
|
gCommonHeaders.Referer = `https://${gHost}/v1/html/buy_plan/buy_plan.html`;
|
|
@@ -142,45 +142,45 @@ async function Main() {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
function checkHandleRequest() {
|
|
function checkHandleRequest() {
|
|
|
- handleHeaders();
|
|
|
|
|
- const request = magicJS.request;
|
|
|
|
|
- const url = request.url;
|
|
|
|
|
- const path = request.path;
|
|
|
|
|
- magicJS.log(`请求url=${url}#${request.method}`);
|
|
|
|
|
- let reqBody = magicJS.getRequestBody();
|
|
|
|
|
- magicJS.log(`请求body=${reqBody}`);
|
|
|
|
|
- if ($request && $request.method != 'OPTIONS') {
|
|
|
|
|
- switch (path) {
|
|
|
|
|
- case '/v1/html/buy_plan/buy_plan.html`':
|
|
|
|
|
- break;
|
|
|
|
|
- default:
|
|
|
|
|
|
|
+ handleHeaders();
|
|
|
|
|
+ const request = magicJS.request;
|
|
|
|
|
+ const url = request.url;
|
|
|
|
|
+ const path = request.path;
|
|
|
|
|
+ magicJS.log(`请求url=${url}#${request.method}`);
|
|
|
|
|
+ let reqBody = magicJS.getRequestBody();
|
|
|
|
|
+ magicJS.log(`请求body=${reqBody}`);
|
|
|
|
|
+ if ($request && $request.method != 'OPTIONS') {
|
|
|
|
|
+ switch (path) {
|
|
|
|
|
+ case '/v1/html/buy_plan/buy_plan.html`':
|
|
|
|
|
+ break;
|
|
|
|
|
+ default:
|
|
|
if (path.indexOf('/api/LotteryPlan/getPksPlanList.do') > -1) {
|
|
if (path.indexOf('/api/LotteryPlan/getPksPlanList.do') > -1) {
|
|
|
- handlePksPlanList();
|
|
|
|
|
- }
|
|
|
|
|
- break;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ handlePksPlanList();
|
|
|
|
|
+ }
|
|
|
|
|
+ break;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
function getResponsePlainData() {
|
|
function getResponsePlainData() {
|
|
|
- let data = magicJS.getResponseBody();
|
|
|
|
|
- if (!data) {
|
|
|
|
|
- return;
|
|
|
|
|
- }
|
|
|
|
|
- try{
|
|
|
|
|
- return JSON.parse(data);
|
|
|
|
|
- } catch(err){
|
|
|
|
|
- magicJS.logger.error(err);
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ let data = magicJS.getResponseBody();
|
|
|
|
|
+ if (!data) {
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ try {
|
|
|
|
|
+ return JSON.parse(data);
|
|
|
|
|
+ } catch (err) {
|
|
|
|
|
+ magicJS.logger.error(err);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-function handlePksPlanList(){
|
|
|
|
|
|
|
+function handlePksPlanList() {
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
function handleHeaders() {
|
|
function handleHeaders() {
|
|
|
- let headers = $request.headers;
|
|
|
|
|
- magicJS.data.write('168_PksPlanAPIHost', headers['Host']);
|
|
|
|
|
|
|
+ let headers = $request.headers;
|
|
|
|
|
+ magicJS.data.write('168_PksPlanAPIHost', headers['Host']);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
function isPlanAEnabled() {
|
|
function isPlanAEnabled() {
|
|
@@ -297,79 +297,79 @@ async function checkLotteryResult() {
|
|
|
magicJS.data.write('168_PksPlanPreDrawIssue', preDrawIssue);
|
|
magicJS.data.write('168_PksPlanPreDrawIssue', preDrawIssue);
|
|
|
|
|
|
|
|
updateRequestHeaders();
|
|
updateRequestHeaders();
|
|
|
- if(isPlanCEnabled()){
|
|
|
|
|
|
|
+ if (isPlanCEnabled()) {
|
|
|
await checkPlanCBuyNotify(pksPlanItemData, pksPlanListData);
|
|
await checkPlanCBuyNotify(pksPlanItemData, pksPlanListData);
|
|
|
}
|
|
}
|
|
|
- if(isPlanBEnabled()){
|
|
|
|
|
|
|
+ if (isPlanBEnabled()) {
|
|
|
await checkPlanBBuyNotify(pksPlanItemData, pksPlanListData);
|
|
await checkPlanBBuyNotify(pksPlanItemData, pksPlanListData);
|
|
|
}
|
|
}
|
|
|
- if(isPlanAEnabled()){
|
|
|
|
|
|
|
+ if (isPlanAEnabled()) {
|
|
|
await checkPlanABuyNotify(pksPlanItemData, pksPlanListData);
|
|
await checkPlanABuyNotify(pksPlanItemData, pksPlanListData);
|
|
|
}
|
|
}
|
|
|
checkLongDragonNotify(pksPlanListData, pksPlanItemData);
|
|
checkLongDragonNotify(pksPlanListData, pksPlanItemData);
|
|
|
return true;
|
|
return true;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-async function checkLongDragonNotify(pksPlanListData, pksPlanItemData){
|
|
|
|
|
|
|
+async function checkLongDragonNotify(pksPlanListData, pksPlanItemData) {
|
|
|
// 挑选出来恶龙
|
|
// 挑选出来恶龙
|
|
|
let failItemC = null;
|
|
let failItemC = null;
|
|
|
let failItemB = null;
|
|
let failItemB = null;
|
|
|
let failItemA = null;
|
|
let failItemA = null;
|
|
|
- for(let i=0; i < pksPlanListData.length; i++){
|
|
|
|
|
|
|
+ for (let i = 0; i < pksPlanListData.length; i++) {
|
|
|
let element = pksPlanListData[i];
|
|
let element = pksPlanListData[i];
|
|
|
element.index = i;
|
|
element.index = i;
|
|
|
- if(!element.preDrawCode || element.preDrawCode.length == 0){
|
|
|
|
|
|
|
+ if (!element.preDrawCode || element.preDrawCode.length == 0) {
|
|
|
continue;
|
|
continue;
|
|
|
}
|
|
}
|
|
|
let lotteryCostC = element.lotteryCostC;
|
|
let lotteryCostC = element.lotteryCostC;
|
|
|
let lotteryCostB = element.lotteryCostB;
|
|
let lotteryCostB = element.lotteryCostB;
|
|
|
let lotteryCostA = element.lotteryCostA;
|
|
let lotteryCostA = element.lotteryCostA;
|
|
|
- let oneCostC = Math.floor(lotteryCostC/3);
|
|
|
|
|
- let oneCostB = Math.floor(lotteryCostB/4);
|
|
|
|
|
- let oneCostA = Math.floor(lotteryCostA/5);
|
|
|
|
|
|
|
+ let oneCostC = Math.floor(lotteryCostC / 3);
|
|
|
|
|
+ let oneCostB = Math.floor(lotteryCostB / 4);
|
|
|
|
|
+ let oneCostA = Math.floor(lotteryCostA / 5);
|
|
|
//let buySeriesNum = Math.floor(Math.log2(oneCostC)) + 1;
|
|
//let buySeriesNum = Math.floor(Math.log2(oneCostC)) + 1;
|
|
|
let series10Cost = 521;
|
|
let series10Cost = 521;
|
|
|
- if(oneCostC >= series10Cost){
|
|
|
|
|
- if(!checkHitPrize(element.preDrawCode, element.planC, 0)){
|
|
|
|
|
|
|
+ if (oneCostC >= series10Cost) {
|
|
|
|
|
+ if (!checkHitPrize(element.preDrawCode, element.planC, 0)) {
|
|
|
failItemC = element;
|
|
failItemC = element;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- if(oneCostB >= series10Cost){
|
|
|
|
|
- if(!checkHitPrize(element.preDrawCode, element.planB, 0)){
|
|
|
|
|
|
|
+ if (oneCostB >= series10Cost) {
|
|
|
|
|
+ if (!checkHitPrize(element.preDrawCode, element.planB, 0)) {
|
|
|
failItemB = element;
|
|
failItemB = element;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- if(oneCostA >= series10Cost){
|
|
|
|
|
- if(!checkHitPrize(element.preDrawCode, element.planA, 0)){
|
|
|
|
|
|
|
+ if (oneCostA >= series10Cost) {
|
|
|
|
|
+ if (!checkHitPrize(element.preDrawCode, element.planA, 0)) {
|
|
|
failItemA = element;
|
|
failItemA = element;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
// 检查是否后面屠杀成功
|
|
// 检查是否后面屠杀成功
|
|
|
- if(failItemC){
|
|
|
|
|
- checkEvilDragonCSlayingNotify(failItemC, pksPlanListData);
|
|
|
|
|
|
|
+ if (failItemC) {
|
|
|
|
|
+ await checkEvilDragonCSlayingNotify(failItemC, pksPlanListData);
|
|
|
}
|
|
}
|
|
|
- if(failItemB){
|
|
|
|
|
- checkEvilDragonBSlayingNotify(failItemB, pksPlanListData);
|
|
|
|
|
|
|
+ if (failItemB) {
|
|
|
|
|
+ await checkEvilDragonBSlayingNotify(failItemB, pksPlanListData);
|
|
|
}
|
|
}
|
|
|
- if(failItemA){
|
|
|
|
|
- checkEvilDragonASlayingNotify(failItemA, pksPlanListData);
|
|
|
|
|
|
|
+ if (failItemA) {
|
|
|
|
|
+ await checkEvilDragonASlayingNotify(failItemA, pksPlanListData);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-function checkEvilDragonCSlayingNotify(failItem, pksPlanListData){
|
|
|
|
|
|
|
+async function checkEvilDragonCSlayingNotify(failItem, pksPlanListData) {
|
|
|
let latestItem = pksPlanListData[0];
|
|
let latestItem = pksPlanListData[0];
|
|
|
let unHitCount = 0;
|
|
let unHitCount = 0;
|
|
|
- for(let i=failItem.index-1; i >= 0; i--){
|
|
|
|
|
|
|
+ for (let i = failItem.index - 1; i >= 0; i--) {
|
|
|
let element = pksPlanListData[i];
|
|
let element = pksPlanListData[i];
|
|
|
- if(!checkHitPrize(element.preDrawCode, failItem.planC, 0)){
|
|
|
|
|
|
|
+ if (!checkHitPrize(element.preDrawCode, failItem.planC, 0)) {
|
|
|
unHitCount += 1;
|
|
unHitCount += 1;
|
|
|
- }else{
|
|
|
|
|
|
|
+ } else {
|
|
|
break;
|
|
break;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- if(failItem.index == unHitCount){
|
|
|
|
|
- let turnCount = 10+unHitCount;
|
|
|
|
|
|
|
+ if (failItem.index == unHitCount) {
|
|
|
|
|
+ let turnCount = 10 + unHitCount;
|
|
|
let maxTurnCount = getPlanLotteryDrongonMaxAmount();
|
|
let maxTurnCount = getPlanLotteryDrongonMaxAmount();
|
|
|
let tipsMsg = `[C]推荐号码:${latestItem.planC} VS 长龙号码:${failItem.planC} 期数:${turnCount}`;
|
|
let tipsMsg = `[C]推荐号码:${latestItem.planC} VS 长龙号码:${failItem.planC} 期数:${turnCount}`;
|
|
|
tipsMsg += `\n期号:${latestItem.preDrawIssue} 开奖时间:${latestItem.preDrawTime} 剩余时间:${latestItem.countTime}s`;
|
|
tipsMsg += `\n期号:${latestItem.preDrawIssue} 开奖时间:${latestItem.preDrawTime} 剩余时间:${latestItem.countTime}s`;
|
|
@@ -377,7 +377,7 @@ function checkEvilDragonCSlayingNotify(failItem, pksPlanListData){
|
|
|
if (isPlanLotteryAutoKillDrongon()) {
|
|
if (isPlanLotteryAutoKillDrongon()) {
|
|
|
let turnOneCost = Math.pow(2, turnCount - 1);
|
|
let turnOneCost = Math.pow(2, turnCount - 1);
|
|
|
let maxBetAmount = getPlanLotteryMaxBetAmount();
|
|
let maxBetAmount = getPlanLotteryMaxBetAmount();
|
|
|
- if(turnCount <= maxTurnCount){
|
|
|
|
|
|
|
+ if (turnCount <= maxTurnCount) {
|
|
|
let betRet = await tryDragonBet(latestItem.preDrawIssue, failItem.planC, turnOneCost, maxBetAmount);
|
|
let betRet = await tryDragonBet(latestItem.preDrawIssue, failItem.planC, turnOneCost, maxBetAmount);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -385,19 +385,19 @@ function checkEvilDragonCSlayingNotify(failItem, pksPlanListData){
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-function checkEvilDragonBSlayingNotify(failItem, pksPlanListData){
|
|
|
|
|
|
|
+async function checkEvilDragonBSlayingNotify(failItem, pksPlanListData) {
|
|
|
let latestItem = pksPlanListData[0];
|
|
let latestItem = pksPlanListData[0];
|
|
|
let unHitCount = 0;
|
|
let unHitCount = 0;
|
|
|
- for(let i=failItem.index-1; i >= 0; i--){
|
|
|
|
|
|
|
+ for (let i = failItem.index - 1; i >= 0; i--) {
|
|
|
let element = pksPlanListData[i];
|
|
let element = pksPlanListData[i];
|
|
|
- if(!checkHitPrize(element.preDrawCode, failItem.planB, 0)){
|
|
|
|
|
|
|
+ if (!checkHitPrize(element.preDrawCode, failItem.planB, 0)) {
|
|
|
unHitCount += 1;
|
|
unHitCount += 1;
|
|
|
- }else{
|
|
|
|
|
|
|
+ } else {
|
|
|
break;
|
|
break;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- if(failItem.index == unHitCount){
|
|
|
|
|
- let turnCount = 10+unHitCount;
|
|
|
|
|
|
|
+ if (failItem.index == unHitCount) {
|
|
|
|
|
+ let turnCount = 10 + unHitCount;
|
|
|
let maxTurnCount = getPlanLotteryDrongonMaxAmount();
|
|
let maxTurnCount = getPlanLotteryDrongonMaxAmount();
|
|
|
let tipsMsg = `[B]推荐号码:${latestItem.planB} VS 长龙号码:${failItem.planB} 期数:${turnCount}`;
|
|
let tipsMsg = `[B]推荐号码:${latestItem.planB} VS 长龙号码:${failItem.planB} 期数:${turnCount}`;
|
|
|
tipsMsg += `\n期号:${latestItem.preDrawIssue} 开奖时间:${latestItem.preDrawTime} 剩余时间:${latestItem.countTime}s`;
|
|
tipsMsg += `\n期号:${latestItem.preDrawIssue} 开奖时间:${latestItem.preDrawTime} 剩余时间:${latestItem.countTime}s`;
|
|
@@ -405,7 +405,7 @@ function checkEvilDragonBSlayingNotify(failItem, pksPlanListData){
|
|
|
if (isPlanLotteryAutoKillDrongon()) {
|
|
if (isPlanLotteryAutoKillDrongon()) {
|
|
|
let turnOneCost = Math.pow(2, turnCount - 1);
|
|
let turnOneCost = Math.pow(2, turnCount - 1);
|
|
|
let maxBetAmount = getPlanLotteryMaxBetAmount();
|
|
let maxBetAmount = getPlanLotteryMaxBetAmount();
|
|
|
- if(turnCount <= maxTurnCount){
|
|
|
|
|
|
|
+ if (turnCount <= maxTurnCount) {
|
|
|
let betRet = await tryDragonBet(latestItem.preDrawIssue, failItem.planB, turnOneCost, maxBetAmount);
|
|
let betRet = await tryDragonBet(latestItem.preDrawIssue, failItem.planB, turnOneCost, maxBetAmount);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -413,19 +413,19 @@ function checkEvilDragonBSlayingNotify(failItem, pksPlanListData){
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-function checkEvilDragonASlayingNotify(failItem, pksPlanListData){
|
|
|
|
|
|
|
+async function checkEvilDragonASlayingNotify(failItem, pksPlanListData) {
|
|
|
let latestItem = pksPlanListData[0];
|
|
let latestItem = pksPlanListData[0];
|
|
|
let unHitCount = 0;
|
|
let unHitCount = 0;
|
|
|
- for(let i=failItem.index-1; i >= 0; i--){
|
|
|
|
|
|
|
+ for (let i = failItem.index - 1; i >= 0; i--) {
|
|
|
let element = pksPlanListData[i];
|
|
let element = pksPlanListData[i];
|
|
|
- if(!checkHitPrize(element.preDrawCode, failItem.planA, 0)){
|
|
|
|
|
|
|
+ if (!checkHitPrize(element.preDrawCode, failItem.planA, 0)) {
|
|
|
unHitCount += 1;
|
|
unHitCount += 1;
|
|
|
- }else{
|
|
|
|
|
|
|
+ } else {
|
|
|
break;
|
|
break;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- if(failItem.index == unHitCount){
|
|
|
|
|
- let turnCount = 10+unHitCount;
|
|
|
|
|
|
|
+ if (failItem.index == unHitCount) {
|
|
|
|
|
+ let turnCount = 10 + unHitCount;
|
|
|
let maxTurnCount = getPlanLotteryDrongonMaxAmount();
|
|
let maxTurnCount = getPlanLotteryDrongonMaxAmount();
|
|
|
let tipsMsg = `[A]推荐号码:${latestItem.planA} VS 长龙号码:${failItem.planA} 期数:${turnCount}`;
|
|
let tipsMsg = `[A]推荐号码:${latestItem.planA} VS 长龙号码:${failItem.planA} 期数:${turnCount}`;
|
|
|
tipsMsg += `\n期号:${latestItem.preDrawIssue} 开奖时间:${latestItem.preDrawTime} 剩余时间:${latestItem.countTime}s`;
|
|
tipsMsg += `\n期号:${latestItem.preDrawIssue} 开奖时间:${latestItem.preDrawTime} 剩余时间:${latestItem.countTime}s`;
|
|
@@ -433,7 +433,7 @@ function checkEvilDragonASlayingNotify(failItem, pksPlanListData){
|
|
|
if (isPlanLotteryAutoKillDrongon()) {
|
|
if (isPlanLotteryAutoKillDrongon()) {
|
|
|
let turnOneCost = Math.pow(2, turnCount - 1);
|
|
let turnOneCost = Math.pow(2, turnCount - 1);
|
|
|
let maxBetAmount = getPlanLotteryMaxBetAmount();
|
|
let maxBetAmount = getPlanLotteryMaxBetAmount();
|
|
|
- if(turnCount <= maxTurnCount){
|
|
|
|
|
|
|
+ if (turnCount <= maxTurnCount) {
|
|
|
let betRet = await tryDragonBet(latestItem.preDrawIssue, failItem.planA, turnOneCost, maxBetAmount);
|
|
let betRet = await tryDragonBet(latestItem.preDrawIssue, failItem.planA, turnOneCost, maxBetAmount);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -441,13 +441,13 @@ function checkEvilDragonASlayingNotify(failItem, pksPlanListData){
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-function checkHitPrize(drawCodeStr, planStr, posNum=0){
|
|
|
|
|
- if(drawCodeStr.length == 0){
|
|
|
|
|
|
|
+function checkHitPrize(drawCodeStr, planStr, posNum = 0) {
|
|
|
|
|
+ if (drawCodeStr.length == 0) {
|
|
|
return false;
|
|
return false;
|
|
|
}
|
|
}
|
|
|
let drawCodeArr = drawCodeStr.split(',');
|
|
let drawCodeArr = drawCodeStr.split(',');
|
|
|
let championCode = drawCodeArr[posNum];
|
|
let championCode = drawCodeArr[posNum];
|
|
|
- if(planStr.indexOf(championCode) > -1){
|
|
|
|
|
|
|
+ if (planStr.indexOf(championCode) > -1) {
|
|
|
return true;
|
|
return true;
|
|
|
}
|
|
}
|
|
|
return false;
|
|
return false;
|
|
@@ -729,7 +729,7 @@ function updateRequestHeaders() {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
-async function tryDragonBet(drawIssue, planStr, betAmount, maxBetAmount=96) {
|
|
|
|
|
|
|
+async function tryDragonBet(drawIssue, planStr, betAmount, maxBetAmount = 96) {
|
|
|
let numArr = planStr.split(',');
|
|
let numArr = planStr.split(',');
|
|
|
let numCount = numArr.length;
|
|
let numCount = numArr.length;
|
|
|
if (numCount >= 5) {
|
|
if (numCount >= 5) {
|
|
@@ -746,27 +746,27 @@ async function tryDragonBet(drawIssue, planStr, betAmount, maxBetAmount=96) {
|
|
|
}
|
|
}
|
|
|
let result = await doDragonBet(drawIssue, planStr, betAmount);
|
|
let result = await doDragonBet(drawIssue, planStr, betAmount);
|
|
|
if (result && result.statusCode == 200) {
|
|
if (result && result.statusCode == 200) {
|
|
|
- if(checkBetResult(result)){
|
|
|
|
|
|
|
+ if (checkBetResult(result)) {
|
|
|
magicJS.notification.post(magicJS.scriptName, `🎉下注成功 号码:${planStr} 单注:${betAmount}`);
|
|
magicJS.notification.post(magicJS.scriptName, `🎉下注成功 号码:${planStr} 单注:${betAmount}`);
|
|
|
- }else{
|
|
|
|
|
|
|
+ } else {
|
|
|
magicJS.notification.post(magicJS.scriptName, `⚠️下注失败 号码:${planStr} 单注:${betAmount}`);
|
|
magicJS.notification.post(magicJS.scriptName, `⚠️下注失败 号码:${planStr} 单注:${betAmount}`);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
return result;
|
|
return result;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-function checkBetResult(data){
|
|
|
|
|
|
|
+function checkBetResult(data) {
|
|
|
let result = data.result;
|
|
let result = data.result;
|
|
|
let account = result.account;
|
|
let account = result.account;
|
|
|
let bets = result.bets;
|
|
let bets = result.bets;
|
|
|
let count = bets.length;
|
|
let count = bets.length;
|
|
|
let sucCount = 0;
|
|
let sucCount = 0;
|
|
|
- for(let i=0; i < count; i++){
|
|
|
|
|
- if(bets[i].success){
|
|
|
|
|
- sucCount+=1;
|
|
|
|
|
|
|
+ for (let i = 0; i < count; i++) {
|
|
|
|
|
+ if (bets[i].success) {
|
|
|
|
|
+ sucCount += 1;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- if(sucCount == count){
|
|
|
|
|
|
|
+ if (sucCount == count) {
|
|
|
return true;
|
|
return true;
|
|
|
}
|
|
}
|
|
|
return false;
|
|
return false;
|
|
@@ -812,7 +812,7 @@ function generateRandString(length) {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
async function clyRequest(method, url, reqData) {
|
|
async function clyRequest(method, url, reqData) {
|
|
|
- if(!gCaiLeHeaders['token'] || gCaiLeHeaders['token'].length == 0){
|
|
|
|
|
|
|
+ if (!gCaiLeHeaders['token'] || gCaiLeHeaders['token'].length == 0) {
|
|
|
magicJS.logger.info(`❌token已失效请重新登陆获取!`);
|
|
magicJS.logger.info(`❌token已失效请重新登陆获取!`);
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|