添加timeout超时
This commit is contained in:
@ -1222,7 +1222,7 @@ function timeFormat(time) {
|
||||
return date.getFullYear() + '-' + ((date.getMonth() + 1) >= 10 ? (date.getMonth() + 1) : '0' + (date.getMonth() + 1)) + '-' + (date.getDate() >= 10 ? date.getDate() : '0' + date.getDate());
|
||||
}
|
||||
function readShareCode() {
|
||||
return new Promise(resolve => {
|
||||
return new Promise(async resolve => {
|
||||
$.get({url: `http://api.turinglabs.net/api/v1/jd/farm/read/${randomCount}/`}, (err, resp, data) => {
|
||||
try {
|
||||
if (err) {
|
||||
@ -1240,6 +1240,8 @@ function readShareCode() {
|
||||
resolve(data);
|
||||
}
|
||||
})
|
||||
await $.wait(10000);
|
||||
resolve()
|
||||
})
|
||||
}
|
||||
function shareCodesFormat() {
|
||||
|
@ -624,8 +624,8 @@ function readShareCode() {
|
||||
resolve(data);
|
||||
}
|
||||
})
|
||||
// await $.wait(2000);
|
||||
// resolve()
|
||||
await $.wait(10000);
|
||||
resolve()
|
||||
})
|
||||
}
|
||||
//格式化助力码
|
||||
|
@ -436,7 +436,7 @@ async function showMsg() {
|
||||
}
|
||||
}
|
||||
function readShareCode() {
|
||||
return new Promise(resolve => {
|
||||
return new Promise(async resolve => {
|
||||
$.get({url: `http://api.turinglabs.net/api/v1/jd/pet/read/${randomCount}/`}, (err, resp, data) => {
|
||||
try {
|
||||
if (err) {
|
||||
@ -454,6 +454,8 @@ function readShareCode() {
|
||||
resolve(data);
|
||||
}
|
||||
})
|
||||
await $.wait(10000);
|
||||
resolve()
|
||||
})
|
||||
}
|
||||
function shareCodesFormat() {
|
||||
|
@ -501,7 +501,7 @@ async function plantBeanIndex() {
|
||||
$.plantBeanIndexResult = await request('plantBeanIndex');//plantBeanIndexBody
|
||||
}
|
||||
function readShareCode() {
|
||||
return new Promise(resolve => {
|
||||
return new Promise(async resolve => {
|
||||
$.get({url: `http://api.turinglabs.net/api/v1/jd/bean/read/${randomCount}/`}, (err, resp, data) => {
|
||||
try {
|
||||
if (err) {
|
||||
@ -519,6 +519,8 @@ function readShareCode() {
|
||||
resolve(data);
|
||||
}
|
||||
})
|
||||
await $.wait(15000);
|
||||
resolve()
|
||||
})
|
||||
}
|
||||
//格式化助力码
|
||||
|
Reference in New Issue
Block a user