Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yysh5
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
yysh5
Commits
0185df87
Commit
0185df87
authored
Sep 10, 2020
by
何娜
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调试提示
parent
334a23b9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
45 deletions
+5
-45
task.js
app/controller/task.js
+0
-39
query.js
app/public/js/query.js
+5
-6
No files found.
app/controller/task.js
View file @
0185df87
...
...
@@ -77,11 +77,6 @@ class TaskController extends Controller {
password
:
md5
(
args
.
password
)
||
''
,
},
},
{
orderId
,
taskId
:
task_id
});
// service.cache.set({
// key: String(task_id) + data.data.orderId,
// value: { status: 'login', note: { message: 'login' } },
// });
// ctx.success({ errcode: 0, taskId: task_id });
ctx
.
success
({
errcode
:
0
,
data
:
{
task_id
}
});
}
...
...
@@ -226,10 +221,6 @@ class TaskController extends Controller {
};
ctx
.
logger
.
info
(
'【handleCallback】 fetchTask'
)
const
result
=
await
service
.
task
.
fetchTask
({
taskId
});
// let taskNote = {
// status: 'init',
// note: { message: 'init' },
// };
switch
(
result
.
code
)
{
case
-
1
:
service
.
order
.
update
({
...
...
@@ -237,27 +228,13 @@ class TaskController extends Controller {
note
:
result
,
},
{
orderId
,
taskId
});
ctx
.
success
({
errcode
:
1
,
data
:
{
state
:
-
1
,
result
:
'服务器出错,请稍后重试'
}
});
// taskNote = {
// status: 'failure',
// note: { message: result.msg },
// };
break
;
case
1
:
// if (result.data.data) {
// result.data = {
// data: JSON.parse(JSON.parse(result.data.data).post_data.strForNextStep),
// loginParam: result.data.loginParam,
// };
// }
service
.
order
.
update
({
status
:
'next'
,
note
:
result
,
},
{
orderId
,
taskId
});
ctx
.
success
({
errcode
:
0
,
data
:
{
state
:
1
,
html
:
service
.
index
.
getSMSHTML
()
}
});
// taskNote = {
// status: 'next',
// note: { message: 'waiting', nextStep: result.data },
// };
break
;
case
110
:
service
.
order
.
update
({
...
...
@@ -265,16 +242,8 @@ class TaskController extends Controller {
note
:
result
,
},
{
orderId
,
taskId
});
ctx
.
success
({
errcode
:
0
,
data
:
{
state
:
5
,
result
:
'更改为Query'
}
});
// taskNote = {
// status: 'query',
// note: { message: 'submit success' },
// };
break
;
case
0
:
// taskNote = {
// status: 'wash',
// note: { message: 'wash' },
// };
try
{
service
.
order
.
update
({
status
:
'wash'
,
...
...
@@ -282,10 +251,6 @@ class TaskController extends Controller {
},
{
orderId
,
taskId
});
await
service
.
washData
.
wash
(
result
,
orderId
);
await
service
.
washData
.
newWash
(
result
,
orderId
);
// await service.cache.set({
// key: String(taskId),
// value: taskNote,
// });
ctx
.
success
({
errcode
:
2
,
data
:
{
state
:
0
,
result
:
'发送数据处理'
}
});
}
catch
(
err
)
{
ctx
.
logger
.
error
(
'handleCallback 0'
,
JSON
.
stringify
(
err
),
JSON
.
stringify
(
result
));
...
...
@@ -294,10 +259,6 @@ class TaskController extends Controller {
note
:
'运营商认证分析失败'
,
},
{
orderId
,
taskId
});
ctx
.
success
({
errcode
:
1
,
data
:
{
state
:
-
1
,
result
:
'运营商认证分析失败'
}
});
// taskNote = {
// status: 'failure',
// note: { message: err.message },
// };
}
break
;
default
:
...
...
app/public/js/query.js
View file @
0185df87
...
...
@@ -1012,7 +1012,8 @@ $(function() {
constant
.
script_root
+
'submit'
,
{
...
params
,
orderId
:
constant
.
orderNum
},
function
(
response
)
{
if
(
response
.
errcode
==
0
)
{
console
.
log
(
'【submit】'
,
JSON
.
stringify
(
response
))
if
(
response
.
errcode
===
0
)
{
const
taskId
=
response
.
data
.
task_id
;
if
(
!!
window
.
WebSocket
&&
window
.
WebSocket
.
prototype
.
send
)
{
const
wsParams
=
{
...
...
@@ -1024,9 +1025,9 @@ $(function() {
}
else
{
const
params
=
{
taskId
:
response
.
data
.
task_id
,
orderId
:
constant
.
orderNum
,
phone
:
constant
.
phone
,
redirectUrl
:
constant
.
redirectUrl
,
appkey
:
constant
.
appkey
};
listen_job_v2
(
params
,
function
(
state
,
result
)
{
if
(
state
==
2
||
state
==
3
)
{
if
(
state
==
=
2
||
state
=
==
3
)
{
fn
();
}
else
if
(
state
==
1
)
{
}
else
if
(
state
==
=
1
)
{
constant
.
hasclick
=
true
;
if
(
step
==
1
)
{
title
=
'成功登录,请获取二次验证码'
;
...
...
@@ -1104,12 +1105,10 @@ $(function() {
}
});
}
}
else
{
setTimeout
(
function
()
{
failed
();
$
.
prompt
(
response
.
errmsg
);
$
.
prompt
(
response
.
data
.
result
);
},
250
);
}
},
...
...
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