添加timeout

This commit is contained in:
lxk0301
2021-01-13 17:06:18 +08:00
parent c2feafa125
commit 72afc90cc0
3 changed files with 3 additions and 3 deletions

View File

@@ -659,7 +659,7 @@ function taskUrl(functionId, body = '') {
function readShareCode() {
console.log(`开始`)
return new Promise(async resolve => {
$.get({url: `https://code.chiang.fun/api/v1/jd/jdcrazyjoy/read/${randomCount}/`}, (err, resp, data) => {
$.get({url: `https://code.chiang.fun/api/v1/jd/jdcrazyjoy/read/${randomCount}/`, 'timeout': 10000}, (err, resp, data) => {
try {
if (err) {
console.log(`${JSON.stringify(err)}`)