Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gjj_api
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
data_server
gjj_api
Commits
369c5e39
Commit
369c5e39
authored
Apr 11, 2019
by
姜登
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
timeout
parent
3eec0c37
Pipeline
#5870
passed with stage
in 2 seconds
Changes
7
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
16 additions
and
16 deletions
+16
-16
task.js
app/controller/task.js
+1
-1
partner.js
app/service/partner.js
+1
-1
scripts.js
app/service/scripts.js
+10
-10
signature.js
app/service/signature.js
+1
-1
storage.js
app/service/storage.js
+1
-1
task.js
app/service/task.js
+1
-1
washData.js
app/service/washData.js
+1
-1
No files found.
app/controller/task.js
View file @
369c5e39
...
...
@@ -97,7 +97,7 @@ class TaskController extends Controller {
ctx
.
logger
.
error
(
'submit'
,
err
);
ctx
.
status
=
200
;
if
(
err
.
code
===
'invalid_param'
)
{
ctx
.
body
=
{
code
:
-
1
,
msg
:
'请求参数有误'
};
ctx
.
body
=
{
code
:
-
1
,
msg
:
err
.
errors
[
0
].
message
};
return
;
}
if
(
/
[
a-zA-Z
]
+/
.
test
(
err
.
message
))
{
...
...
app/service/partner.js
View file @
369c5e39
...
...
@@ -15,7 +15,7 @@ class PartnerService extends Service {
if
(
notifyUrl
&&
notice
!==
'1'
)
{
const
ret
=
await
ctx
.
curl
(
notifyUrl
,
{
charset
:
'utf-8'
,
timeout
:
[
'30s'
,
'30s'
],
timeout
:
[
30000
,
30000
],
contentType
:
'json'
,
method
:
'POST'
,
data
:
{
...
...
app/service/scripts.js
View file @
369c5e39
...
...
@@ -32,7 +32,7 @@ class ScriptsService extends Service {
}
const
result
=
await
ctx
.
curl
(
baseURL
+
fetchScriptsUrl
,
{
charset
:
'utf-8'
,
timeout
:
[
'30s'
,
'30s'
],
timeout
:
[
30000
,
30000
],
dataType
:
'json'
,
contentType
:
'json'
,
});
...
...
@@ -56,7 +56,7 @@ class ScriptsService extends Service {
}
const
result
=
await
ctx
.
curl
(
baseURL
+
fetchOneScriptUrl
+
'/'
+
scriptId
,
{
charset
:
'utf-8'
,
timeout
:
[
'30s'
,
'30s'
],
timeout
:
[
30000
,
30000
],
dataType
:
'json'
,
contentType
:
'json'
,
});
...
...
@@ -82,7 +82,7 @@ class ScriptsService extends Service {
const
result
=
await
ctx
.
curl
(
baseURL
+
fetchParamsInfoUrl
,
{
charset
:
'utf-8'
,
timeout
:
[
'30s'
,
'30s'
],
timeout
:
[
30000
,
30000
],
dataType
:
'json'
,
contentType
:
'json'
,
});
...
...
@@ -97,7 +97,7 @@ class ScriptsService extends Service {
const
{
baseURL
,
scriptsAPI
:
{
fetchHelpUrl
},
ctx
}
=
this
;
const
result
=
await
ctx
.
curl
(
baseURL
+
fetchHelpUrl
+
'/'
+
scriptId
,
{
charset
:
'utf-8'
,
timeout
:
[
'30s'
,
'30s'
],
timeout
:
[
30000
,
30000
],
dataType
:
'json'
,
contentType
:
'json'
,
});
...
...
@@ -108,7 +108,7 @@ class ScriptsService extends Service {
const
{
baseURL
,
scriptsAPI
:
{
fetchQueryButtonUrl
},
ctx
}
=
this
;
const
result
=
await
ctx
.
curl
(
baseURL
+
fetchQueryButtonUrl
+
'/'
+
scriptId
,
{
charset
:
'utf-8'
,
timeout
:
[
'30s'
,
'30s'
],
timeout
:
[
30000
,
30000
],
dataType
:
'json'
,
contentType
:
'json'
,
});
...
...
@@ -119,7 +119,7 @@ class ScriptsService extends Service {
const
{
baseURL
,
scriptsAPI
:
{
fetchNoticeUrl
},
ctx
}
=
this
;
const
result
=
await
ctx
.
curl
(
baseURL
+
fetchNoticeUrl
+
'/'
+
scriptId
,
{
charset
:
'utf-8'
,
timeout
:
[
'30s'
,
'30s'
],
timeout
:
[
30000
,
30000
],
dataType
:
'json'
,
contentType
:
'json'
,
});
...
...
@@ -130,7 +130,7 @@ class ScriptsService extends Service {
const
{
baseURL
,
scriptsAPI
:
{
fetchHubSeriptsUrl
},
ctx
}
=
this
;
const
result
=
await
ctx
.
curl
(
baseURL
+
fetchHubSeriptsUrl
+
'/'
+
hubId
+
'/scripts'
,
{
charset
:
'utf-8'
,
timeout
:
[
'30s'
,
'30s'
],
timeout
:
[
30000
,
30000
],
dataType
:
'json'
,
contentType
:
'json'
,
});
...
...
@@ -143,7 +143,7 @@ class ScriptsService extends Service {
const
url
=
`https://api.map.baidu.com/location/ip?ak=3TBenWOhPygtFFazaR5kSibU&ip=
${
ip
}
`
;
const
result
=
await
ctx
.
curl
(
url
,
{
charset
:
'utf-8'
,
timeout
:
[
'30s'
,
'30s'
],
timeout
:
[
30000
,
30000
],
dataType
:
'json'
,
contentType
:
'json'
,
});
...
...
@@ -158,7 +158,7 @@ class ScriptsService extends Service {
const
{
baseURL
,
scriptsAPI
:
{
fetchScriptByCityNameUrl
},
ctx
}
=
this
;
const
result
=
await
ctx
.
curl
(
baseURL
+
fetchScriptByCityNameUrl
+
'?name='
+
encodeURIComponent
(
name
)
+
'&type=query'
,
{
charset
:
'utf-8'
,
timeout
:
[
'30s'
,
'30s'
],
timeout
:
[
30000
,
30000
],
dataType
:
'json'
,
contentType
:
'json'
,
});
...
...
@@ -186,7 +186,7 @@ class ScriptsService extends Service {
const
{
cityListAPI
,
ctx
}
=
this
;
const
result
=
await
ctx
.
curl
(
cityListAPI
,
{
charset
:
'utf-8'
,
timeout
:
[
'30s'
,
'30s'
],
timeout
:
[
30000
,
30000
],
dataType
:
'json'
,
contentType
:
'json'
,
});
...
...
app/service/signature.js
View file @
369c5e39
...
...
@@ -23,7 +23,7 @@ class SignatureService extends Service {
url
=
`
${
baseURL
}${
url
}
`
;
opts
=
{
charset
:
'utf-8'
,
timeout
:
[
'30s'
,
'30s'
],
timeout
:
[
30000
,
30000
],
dataType
:
'json'
,
...
opts
,
};
...
...
app/service/storage.js
View file @
369c5e39
...
...
@@ -19,7 +19,7 @@ class StorageService extends Service {
url
=
`
${
baseURL
}${
url
}
`
;
opts
=
{
charset
:
'utf-8'
,
timeout
:
[
'30s'
,
'30s'
],
timeout
:
[
30000
,
30000
],
dataType
:
'json'
,
...
opts
,
};
...
...
app/service/task.js
View file @
369c5e39
...
...
@@ -18,7 +18,7 @@ class TaskService extends Service {
url
=
`
${
baseURL
}${
url
}
`
;
opts
=
{
charset
:
'utf-8'
,
timeout
:
[
'30s'
,
'30s'
],
timeout
:
[
30000
,
30000
],
dataType
:
'json'
,
...
opts
,
};
...
...
app/service/washData.js
View file @
369c5e39
...
...
@@ -16,7 +16,7 @@ class WashDataService extends Service {
const
washData
=
await
app
.
curl
(
washUrl
,
{
charset
:
'utf-8'
,
timeout
:
[
'30s'
,
'30s'
],
timeout
:
[
30000
,
30000
],
dataType
:
'json'
,
data
:
rawdata
,
method
:
'post'
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment