API 请求超时由 3000 改为 10000

This commit is contained in:
guyuexuan
2021-01-13 15:50:26 +08:00
parent 0715d79954
commit faa28664d9
4 changed files with 15 additions and 15 deletions

View File

@ -504,7 +504,7 @@ function queryVkComponent() {
"User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.2.2;14.2;%E4%BA%AC%E4%B8%9C/9.2.2 CFNetwork/1206 Darwin/20.1.0"),
"Accept-Language": `zh-Hans-CN;q=1, en-CN;q=0.9`,
},
"timeout": 3000,
"timeout": 10000,
}
$.post(options, (err, resp, data) => {
try {
@ -622,7 +622,7 @@ function jdfactory_getHomeData() {
function readShareCode() {
console.log(`开始`)
return new Promise(async resolve => {
$.get({url: `http://api.turinglabs.net/api/v1/jd/ddfactory/read/${randomCount}/`, timeout: 3000}, (err, resp, data) => {
$.get({url: `http://api.turinglabs.net/api/v1/jd/ddfactory/read/${randomCount}/`, timeout: 10000}, (err, resp, data) => {
try {
if (err) {
console.log(`${JSON.stringify(err)}`)
@ -697,7 +697,7 @@ function taskPostUrl(function_id, body = {}, function_id2) {
'Content-Type': 'application/x-www-form-urlencoded',
"User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.2.2;14.2;%E4%BA%AC%E4%B8%9C/9.2.2 CFNetwork/1206 Darwin/20.1.0"),
},
timeout: 3000,
timeout: 10000,
}
}
function TotalBean() {
@ -714,7 +714,7 @@ function TotalBean() {
"Referer": "https://wqs.jd.com/my/jingdou/my.shtml?sceneval=2",
"User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.2.2;14.2;%E4%BA%AC%E4%B8%9C/9.2.2 CFNetwork/1206 Darwin/20.1.0")
},
"timeout": 3000,
"timeout": 10000,
}
$.post(options, (err, resp, data) => {
try {