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
412d9ef5
Commit
412d9ef5
authored
Sep 04, 2020
by
何娜
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调试ws1
parent
e0fe4d6c
Pipeline
#27932
passed with stage
in 22 seconds
Changes
3
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
3 deletions
+20
-3
index.js
app/controller/index.js
+1
-1
router.js
app/router.js
+3
-2
order.js
app/service/order.js
+16
-0
No files found.
app/controller/index.js
View file @
412d9ef5
...
...
@@ -69,7 +69,7 @@ class IndexController extends Controller {
OrderNum
:
orderId
,
TaskId
:
''
,
redirectUrl
:
redirect
,
app
Key
:
app
key
,
appkey
,
scriptId
:
Number
(
data
.
id
),
});
}
else
{
...
...
app/router.js
View file @
412d9ef5
...
...
@@ -10,17 +10,18 @@ module.exports = app => {
yysRouter
.
get
(
'/index'
,
controller
.
index
.
index
);
// H5页面
yysRouter
.
get
(
'/scripts'
,
controller
.
task
.
configs
);
// 获取所有脚本配置信息
yysRouter
.
post
(
'/fields'
,
controller
.
task
.
fields
);
// 更换运营商
yysRouter
.
post
(
'/tasks'
,
controller
.
task
.
create
);
// 创建任务
yysRouter
.
get
(
'/tasks/:taskId'
,
controller
.
task
.
show
);
// 获取任务状态
yysRouter
.
post
(
'/submit'
,
controller
.
task
.
submit
);
// 提交任务参数
yysRouter
.
post
(
'/capture'
,
controller
.
task
.
fetchCapture
);
// 获取验证码
yysRouter
.
post
(
'/callback'
,
controller
.
task
.
handleCallback
);
// 处理回调结果,不对外
yysRouter
.
post
(
'/dataCallback'
,
controller
.
task
.
dataCallback
);
// 数据处理完成结果,不对外
yysRouter
.
post
(
'/newdataCallback'
,
controller
.
task
.
newdataCallback
);
// 运营报告处理完成结果,不对外
yysRouter
.
ws
(
'/ws'
,
controller
.
task
.
wslink
);
// yysRouter.get('/scripts', controller.script.fetchScripts); // 获取所有脚本信息
// yysRouter.get('/scripts/:phone');// 手机号获取脚本信息
// yysRouter.get('/scripts/:scriptId', controller.script.fetchOneScripts); // 获取单一脚本信息
...
...
app/service/order.js
View file @
412d9ef5
...
...
@@ -24,6 +24,22 @@ class OrderService extends Service {
return
;
}
async
getOneByParams
(
where
){
const
{
ctx
}
=
this
;
const
order
=
await
ctx
.
model
.
TaskStatus
.
findAll
({
where
,
});
if
(
order
.
length
===
0
)
{
ctx
.
throw
(
400
,
{
message
:
'no orderId'
});
return
;
}
if
(
order
.
length
>
1
)
{
ctx
.
throw
(
400
,
{
message
:
'error orderId or taskId'
});
return
;
}
return
order
[
0
];
}
/*
@desc 更新task
*/
...
...
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