添加timeout
This commit is contained in:
@@ -259,7 +259,7 @@ function showMsg() {
|
|||||||
function readShareCode() {
|
function readShareCode() {
|
||||||
console.log(`开始`)
|
console.log(`开始`)
|
||||||
return new Promise(async resolve => {
|
return new Promise(async resolve => {
|
||||||
$.get({url: `https://code.chiang.fun/api/v1/jd/jdcash/read/${randomCount}/`}, (err, resp, data) => {
|
$.get({url: `https://code.chiang.fun/api/v1/jd/jdcash/read/${randomCount}/`, 'timeout': 10000}, (err, resp, data) => {
|
||||||
try {
|
try {
|
||||||
if (err) {
|
if (err) {
|
||||||
console.log(`${JSON.stringify(err)}`)
|
console.log(`${JSON.stringify(err)}`)
|
||||||
|
@@ -659,7 +659,7 @@ function taskUrl(functionId, body = '') {
|
|||||||
function readShareCode() {
|
function readShareCode() {
|
||||||
console.log(`开始`)
|
console.log(`开始`)
|
||||||
return new Promise(async resolve => {
|
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 {
|
try {
|
||||||
if (err) {
|
if (err) {
|
||||||
console.log(`${JSON.stringify(err)}`)
|
console.log(`${JSON.stringify(err)}`)
|
||||||
|
@@ -336,7 +336,7 @@ async function helpFriends() {
|
|||||||
function readShareCode() {
|
function readShareCode() {
|
||||||
console.log(`开始`)
|
console.log(`开始`)
|
||||||
return new Promise(async resolve => {
|
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 {
|
try {
|
||||||
if (err) {
|
if (err) {
|
||||||
console.log(`${JSON.stringify(err)}`)
|
console.log(`${JSON.stringify(err)}`)
|
||||||
|
Reference in New Issue
Block a user