|
|
@@ -165,7 +165,7 @@ async function checkExploreOne(accountData) {
|
|
|
// await loadIndex();
|
|
|
if (userInfo && userInfo.phone && userInfo.password && userInfo.token) {
|
|
|
lk.log('使用本地用户缓存数据,无需重现登录');
|
|
|
- let paraData = await getParadropData(userInfo.phone, userInfo.password, userInfo.token);
|
|
|
+ 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);
|
|
|
@@ -184,7 +184,7 @@ async function checkExploreOne(accountData) {
|
|
|
lk.log(`尝试第${i + 1}次...`);
|
|
|
userInfo = await doLogin(phone, password, codeStr);
|
|
|
if (userInfo) {
|
|
|
- let paraData = await getParadropData(userInfo.phone, userInfo.password, userInfo.token);
|
|
|
+ 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);
|
|
|
@@ -687,6 +687,17 @@ async function doExplore(phone, password, token) {
|
|
|
});
|
|
|
}
|
|
|
|
|
|
+async function tryGetParadropData(phone, password, token) {
|
|
|
+ let tryCount = 4;
|
|
|
+ let retData;
|
|
|
+ for (let i = 0; i < tryCount; i++) {
|
|
|
+ retData = await getParadropData(phone, password, token);
|
|
|
+ if (retData) {
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return retData;
|
|
|
+}
|
|
|
|
|
|
async function getParadropData(phone, password, token) {
|
|
|
return new Promise((resolve, _reject) => {
|