Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
forgot_server
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
forgot_server
Commits
cf8b2060
Commit
cf8b2060
authored
Dec 05, 2019
by
姜登
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
type
parent
3a1c05b9
Pipeline
#17849
passed with stage
in 3 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
19 deletions
+19
-19
task.js
app/controller/task.js
+1
-1
task.js
app/service/task.js
+18
-18
No files found.
app/controller/task.js
View file @
cf8b2060
...
...
@@ -106,8 +106,8 @@ class TaskController extends Controller {
const
{
type
}
=
ctx
.
request
.
body
;
const
result
=
await
service
.
task
.
fetchCapture
({
taskId
,
type
,
taskType
,
type
,
});
ctx
.
success
(
result
);
}
...
...
app/service/task.js
View file @
cf8b2060
/*
* @Descripttion:
* @version:
* @Descripttion:
* @version:
* @Author: jd
* @Date: 2019-12-02 17:25:35
* @LastEditors: jd
* @LastEditTime: 2019-12-0
3 15:28:31
* @LastEditTime: 2019-12-0
5 11:19:39
*/
'use strict'
;
...
...
@@ -24,18 +24,18 @@ class TaskService extends Service {
const
{
ctx
}
=
this
;
let
scriptsType
=
''
;
switch
(
type
)
{
case
'gjj'
:
scriptsType
=
':18524/gjjfindpwd'
;
break
;
case
'shebao'
:
scriptsType
=
':18523/shebaofindpwd'
;
break
;
case
'incomeTax'
:
scriptsType
=
':18518/gsfindpwd'
;
break
;
default
:
ctx
.
throw
(
422
,
{
message
:
'无效的类型'
});
break
;
case
'gjj'
:
scriptsType
=
':18524/gjjfindpwd'
;
break
;
case
'shebao'
:
scriptsType
=
':18523/shebaofindpwd'
;
break
;
case
'incomeTax'
:
scriptsType
=
':18518/gsfindpwd'
;
break
;
default
:
ctx
.
throw
(
422
,
{
message
:
'无效的类型'
});
break
;
}
return
scriptsType
;
}
...
...
@@ -74,7 +74,7 @@ class TaskService extends Service {
return
result
.
data
.
data
.
taskId
;
}
async
fetchCapture
({
taskId
,
taskType
})
{
async
fetchCapture
({
taskId
,
taskType
,
type
})
{
const
{
taskAPI
,
ctx
}
=
this
;
const
{
fetchCodeUrl
}
=
taskAPI
;
const
result
=
await
this
.
_request
(
this
.
checkType
(
type
)
+
fetchCodeUrl
,
{
...
...
@@ -93,7 +93,7 @@ class TaskService extends Service {
this
.
_checkSuccess
(
result
);
return
result
.
data
.
data
;
}
async
submit
(
data
)
{
async
submit
(
data
,
type
)
{
const
{
taskAPI
,
ctx
}
=
this
;
const
{
submitTaskUrl
}
=
taskAPI
;
const
result
=
await
this
.
_request
(
this
.
checkType
(
type
)
+
submitTaskUrl
,
{
...
...
@@ -105,7 +105,7 @@ class TaskService extends Service {
this
.
_checkSuccess
(
result
);
return
result
;
}
async
fetchTask
(
data
)
{
async
fetchTask
(
data
,
type
)
{
const
{
taskAPI
,
ctx
}
=
this
;
const
{
fetchTaskUrl
}
=
taskAPI
;
const
result
=
await
this
.
_request
(
this
.
checkType
(
type
)
+
fetchTaskUrl
,
{
...
...
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