|
|
@@ -116,7 +116,7 @@ function handleUserInfo() {
|
|
|
|
|
|
|
|
|
async function all() {
|
|
|
- let isShowMsg = await checkTryExploreAll();
|
|
|
+ let isShowMsg = await allAccountExplore();
|
|
|
if (isShowMsg) {
|
|
|
lk.msg(``);
|
|
|
}
|
|
|
@@ -144,7 +144,7 @@ function getAllUserList() {
|
|
|
return userLst;
|
|
|
}
|
|
|
|
|
|
-async function checkTryExploreAll() {
|
|
|
+async function allAccountExplore() {
|
|
|
let userLst = getAllUserList();
|
|
|
let succCnt = 0;
|
|
|
for (let info of userLst) {
|
|
|
@@ -152,6 +152,7 @@ async function checkTryExploreAll() {
|
|
|
if (isSucc) {
|
|
|
succCnt++;
|
|
|
}
|
|
|
+ break;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -168,7 +169,7 @@ async function checkExploreOne(accountData) {
|
|
|
let paraData = await tryGetParadropData(userInfo.phone, userInfo.password, userInfo.token);
|
|
|
if (paraData) {
|
|
|
if (!checkIsExploring(paraData)) {
|
|
|
- let exploreData = await doExplore(userInfo.phone, userInfo.password, userInfo.token);
|
|
|
+ let exploreData = await tryExplore(userInfo.phone, userInfo.password, userInfo.token);
|
|
|
if (exploreData) {
|
|
|
isSucc = true;
|
|
|
}
|
|
|
@@ -187,7 +188,7 @@ async function checkExploreOne(accountData) {
|
|
|
let paraData = await tryGetParadropData(userInfo.phone, userInfo.password, userInfo.token);
|
|
|
if (paraData) {
|
|
|
if (!checkIsExploring(paraData)) {
|
|
|
- let exploreData = await doExplore(userInfo.phone, userInfo.password, userInfo.token);
|
|
|
+ let exploreData = await tryExplore(userInfo.phone, userInfo.password, userInfo.token);
|
|
|
if (exploreData) {
|
|
|
isSucc = true;
|
|
|
}
|
|
|
@@ -637,6 +638,19 @@ async function doLogin(phone, password, verifyCode) {
|
|
|
});
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+async function tryExplore(phone, password, token) {
|
|
|
+ let retData;
|
|
|
+ let tryCount = 5;
|
|
|
+ for (let i = 0; i < tryCount; i++) {
|
|
|
+ retData = await doExplore(phone, password, token);
|
|
|
+ if (retData) {
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return retData;
|
|
|
+}
|
|
|
+
|
|
|
async function doExplore(phone, password, token) {
|
|
|
return new Promise((resolve, _reject) => {
|
|
|
try {
|
|
|
@@ -688,7 +702,7 @@ async function doExplore(phone, password, token) {
|
|
|
}
|
|
|
|
|
|
async function tryGetParadropData(phone, password, token) {
|
|
|
- let tryCount = 4;
|
|
|
+ let tryCount = 2;
|
|
|
let retData;
|
|
|
for (let i = 0; i < tryCount; i++) {
|
|
|
retData = await getParadropData(phone, password, token);
|