Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
taxh5
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
taxh5
Commits
4231eaf5
Commit
4231eaf5
authored
Mar 14, 2019
by
何娜
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tax
parent
def2bf94
Pipeline
#4469
passed with stage
in 3 seconds
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
5 deletions
+4
-5
task.js
app/service/task.js
+4
-5
No files found.
app/service/task.js
View file @
4231eaf5
...
...
@@ -34,7 +34,6 @@ class TaskService extends Service {
_checkSuccess
(
result
)
{
if
(
result
.
status
!==
200
)
{
ctx
.
logger
.
info
(
'_checkSuccess'
,
JSON
.
stringify
(
result
))
const
errorMsg
=
result
.
data
&&
result
.
data
.
error_msg
?
result
.
data
.
error_msg
:
'unknown error'
;
this
.
ctx
.
throw
(
result
.
status
,
errorMsg
);
}
...
...
@@ -103,8 +102,8 @@ class TaskService extends Service {
let
newCityMap
=
new
Map
();
const
newret
=
await
this
.
_request
(
cityConfigUrl
,
'gsgj'
,
{
method
:
'get'
});
ctx
.
logger
.
info
(
`【Task】getCityList
${
cityConfigUrl
}
params gsgj`
,
JSON
.
stringify
(
newret
.
data
.
code
));
this
.
_checkSuccess
(
newret
);
ctx
.
logger
.
info
(
`【Task】getCityList
${
cityConfigUrl
}
params gsgj`
,
JSON
.
stringify
(
newret
));
//
this._checkSuccess(newret);
newret
.
data
.
data
.
map
(
Prov
=>
{
Prov
.
citys
.
map
(
city
=>
{
newCityMap
.
set
(
String
(
city
.
id
),
city
)
...
...
@@ -112,8 +111,8 @@ class TaskService extends Service {
});
const
ret
=
await
this
.
_request
(
cityConfigUrl
,
'51gs'
,
{
method
:
'get'
});
ctx
.
logger
.
info
(
`【Task】getCityList
${
cityConfigUrl
}
params 51gs`
,
JSON
.
stringify
(
newret
.
data
.
code
));
this
.
_checkSuccess
(
ret
);
ctx
.
logger
.
info
(
`【Task】getCityList
${
cityConfigUrl
}
params 51gs`
,
JSON
.
stringify
(
newret
));
//
this._checkSuccess(ret);
ret
.
data
.
data
.
map
(
Prov
=>
{
let
newProv
=
{
provinceName
:
Prov
.
provinceName
,
citys
:
[]};
Prov
.
citys
.
map
(
city
=>
{
...
...
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