添加timeout

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

View File

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