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
3c72628f
Commit
3c72628f
authored
Aug 18, 2020
by
何娜
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调试运营商接口
parent
32baf45b
Pipeline
#27532
passed with stage
in 4 seconds
Changes
12
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
143 additions
and
45 deletions
+143
-45
.travis.yml
.travis.yml
+4
-2
app.js
app.js
+2
-0
order.js
app/controller/order.js
+4
-4
task.js
app/controller/task.js
+48
-5
helper.js
app/extend/helper.js
+1
-1
router.js
app/router.js
+5
-2
partner.js
app/service/partner.js
+9
-5
storage.js
app/service/storage.js
+1
-1
task.js
app/service/task.js
+22
-16
washData.js
app/service/washData.js
+26
-0
config.local.js
config/config.local.js
+13
-9
config.prod.js
config/config.prod.js
+8
-0
No files found.
.travis.yml
View file @
3c72628f
sudo
:
false
language
:
node_js
language
:
node_js
node_js
:
node_js
:
-
'
8'
-
'
8'
before_install
:
-
npm i npminstall -g
install
:
install
:
-
npm
i npminstall && npm
install
-
npminstall
script
:
script
:
-
npm run ci
-
npm run ci
after_script
:
after_script
:
...
...
app.js
View file @
3c72628f
'use strict'
;
module
.
exports
=
app
=>
{
module
.
exports
=
app
=>
{
// 自定义内容
// 自定义内容
...
...
app/controller/order.js
View file @
3c72628f
...
@@ -66,10 +66,10 @@ class OrderController extends Controller {
...
@@ -66,10 +66,10 @@ class OrderController extends Controller {
const
{
ctx
,
service
}
=
this
;
const
{
ctx
,
service
}
=
this
;
ctx
.
validate
(
this
.
createRule
);
ctx
.
validate
(
this
.
createRule
);
let
{
appKey
,
userId
,
notifyUrl
,
backUrl
,
orderId
,
phone
,
netMark
}
=
ctx
.
request
.
body
;
let
{
appKey
,
userId
,
notifyUrl
,
backUrl
,
orderId
,
phone
,
netMark
}
=
ctx
.
request
.
body
;
const
appKeyInfo
=
await
service
.
partner
.
fetchInfo
(
appKey
);
//
const appKeyInfo = await service.partner.fetchInfo(appKey);
if
(
!
(
appKeyInfo
&&
appKeyInfo
.
valid
===
true
&&
appKeyInfo
.
enableYys
===
true
))
{
//
if (!(appKeyInfo && appKeyInfo.valid === true && appKeyInfo.enableYys === true)) {
return
ctx
.
fail
(
'未开通此服务'
);
//
return ctx.fail('未开通此服务');
}
//
}
if
(
netMark
!==
1
)
{
if
(
netMark
!==
1
)
{
netMark
=
0
;
netMark
=
0
;
}
}
...
...
app/controller/task.js
View file @
3c72628f
...
@@ -44,11 +44,30 @@ class TaskController extends Controller {
...
@@ -44,11 +44,30 @@ class TaskController extends Controller {
};
};
}
}
async
configs
()
{
const
{
ctx
,
service
}
=
this
;
const
{
appKey
}
=
ctx
.
query
;
let
limitScriptsList
=
false
;
if
(
appKey
)
{
const
ret
=
await
service
.
partner
.
fetchInfo
(
appKey
);
if
(
ret
)
{
limitScriptsList
=
ret
.
hfExcludeScripts
;
}
}
let
data
=
await
service
.
task
.
configs
();
if
(
limitScriptsList
)
{
data
=
data
.
filter
(
item
=>
{
return
!
(
limitScriptsList
.
includes
(
item
.
id
));
});
}
ctx
.
success
(
data
);
}
async
create
()
{
async
create
()
{
const
{
ctx
,
service
}
=
this
;
const
{
ctx
,
service
}
=
this
;
ctx
.
validate
(
this
.
createRule
);
ctx
.
validate
(
this
.
createRule
);
const
{
scriptId
,
orderId
}
=
ctx
.
request
.
body
;
const
{
scriptId
,
orderId
}
=
ctx
.
request
.
body
;
const
taskId
=
await
service
.
task
.
create
(
scriptId
);
const
taskId
=
await
service
.
task
.
create
(
{
cityId
:
scriptId
,
orderId
}
);
await
service
.
order
.
update
({
orderId
,
cityId
:
scriptId
,
taskId
});
await
service
.
order
.
update
({
orderId
,
cityId
:
scriptId
,
taskId
});
await
service
.
cache
.
set
({
await
service
.
cache
.
set
({
key
:
String
(
taskId
),
key
:
String
(
taskId
),
...
@@ -107,9 +126,6 @@ class TaskController extends Controller {
...
@@ -107,9 +126,6 @@ class TaskController extends Controller {
};
};
switch
(
result
.
code
)
{
switch
(
result
.
code
)
{
case
-
1
:
case
-
1
:
case
106
:
case
102
:
case
204
:
taskNote
=
{
taskNote
=
{
status
:
'failure'
,
status
:
'failure'
,
note
:
{
message
:
result
.
msg
},
note
:
{
message
:
result
.
msg
},
...
@@ -130,7 +146,7 @@ class TaskController extends Controller {
...
@@ -130,7 +146,7 @@ class TaskController extends Controller {
case
110
:
case
110
:
taskNote
=
{
taskNote
=
{
status
:
'query'
,
status
:
'query'
,
note
:
{
message
:
'
login
success'
},
note
:
{
message
:
'
submit
success'
},
};
};
break
;
break
;
case
0
:
case
0
:
...
@@ -145,6 +161,7 @@ class TaskController extends Controller {
...
@@ -145,6 +161,7 @@ class TaskController extends Controller {
}
}
const
{
orderId
,
netMark
}
=
order
;
const
{
orderId
,
netMark
}
=
order
;
await
service
.
washData
.
wash
(
result
,
orderId
,
netMark
);
await
service
.
washData
.
wash
(
result
,
orderId
,
netMark
);
await
service
.
washData
.
newWash
(
result
,
orderId
,
netMark
);
await
service
.
cache
.
set
({
await
service
.
cache
.
set
({
key
:
String
(
taskId
),
key
:
String
(
taskId
),
value
:
taskNote
,
value
:
taskNote
,
...
@@ -195,6 +212,32 @@ class TaskController extends Controller {
...
@@ -195,6 +212,32 @@ class TaskController extends Controller {
});
});
}
}
async
newdataCallback
()
{
const
{
ctx
,
service
}
=
this
;
ctx
.
body
=
{
code
:
200
,
};
const
{
taskId
,
state
}
=
ctx
.
request
.
body
;
const
order
=
await
service
.
order
.
getOneByTaskId
(
String
(
taskId
));
if
(
!
order
)
{
throw
new
Error
(
'任务不存在'
);
}
let
taskNote
=
{
status
:
'failure'
,
note
:
{
message
:
'存储数据出错'
},
};
if
(
state
===
'success'
)
{
taskNote
=
{
status
:
'success'
,
note
:
{
message
:
'task success'
},
};
}
await
service
.
partner
.
notice
(
order
,
state
,
1
);
await
service
.
cache
.
set
({
key
:
String
(
taskId
),
value
:
taskNote
,
});
}
}
}
module
.
exports
=
TaskController
;
module
.
exports
=
TaskController
;
app/extend/helper.js
View file @
3c72628f
'use strict'
;
'use strict'
;
const
crypto
=
require
(
'crypto'
);
const
crypto
=
require
(
'crypto'
);
const
uuid
=
require
(
'uuid
/v1'
)
;
const
uuid
=
require
(
'uuid
'
).
v1
;
const
iconv
=
require
(
'iconv-lite'
);
const
iconv
=
require
(
'iconv-lite'
);
function
process
(
data
)
{
function
process
(
data
)
{
...
...
app/router.js
View file @
3c72628f
...
@@ -7,6 +7,8 @@ module.exports = app => {
...
@@ -7,6 +7,8 @@ module.exports = app => {
const
{
router
,
controller
}
=
app
;
const
{
router
,
controller
}
=
app
;
const
yysRouter
=
router
.
namespace
(
app
.
config
.
projectRootPath
);
const
yysRouter
=
router
.
namespace
(
app
.
config
.
projectRootPath
);
yysRouter
.
get
(
'/scripts'
,
controller
.
task
.
configs
);
// 获取所有脚本配置信息
yysRouter
.
post
(
'/tasks'
,
controller
.
task
.
create
);
// 创建任务
yysRouter
.
post
(
'/tasks'
,
controller
.
task
.
create
);
// 创建任务
yysRouter
.
get
(
'/tasks/:taskId'
,
controller
.
task
.
show
);
// 获取任务状态
yysRouter
.
get
(
'/tasks/:taskId'
,
controller
.
task
.
show
);
// 获取任务状态
yysRouter
.
post
(
'/tasks/:taskId/submit'
,
controller
.
task
.
submit
);
// 提交任务参数
yysRouter
.
post
(
'/tasks/:taskId/submit'
,
controller
.
task
.
submit
);
// 提交任务参数
...
@@ -15,11 +17,11 @@ module.exports = app => {
...
@@ -15,11 +17,11 @@ module.exports = app => {
yysRouter
.
post
(
'/callback'
,
controller
.
task
.
handleCallback
);
// 处理回调结果,不对外
yysRouter
.
post
(
'/callback'
,
controller
.
task
.
handleCallback
);
// 处理回调结果,不对外
yysRouter
.
post
(
'/dataCallback'
,
controller
.
task
.
dataCallback
);
// 数据处理完成结果,不对外
yysRouter
.
post
(
'/dataCallback'
,
controller
.
task
.
dataCallback
);
// 数据处理完成结果,不对外
yysRouter
.
post
(
'/newdataCallback'
,
controller
.
task
.
newdataCallback
);
// 运营报告处理完成结果,不对外
// yysRouter.get('/scripts', controller.script.fetchScripts); // 获取所有脚本信息
// yysRouter.get('/scripts', controller.script.fetchScripts); // 获取所有脚本信息
// yysRouter.get('/scripts/:phone');// 手机号获取脚本信息
// yysRouter.get('/scripts/:phone');// 手机号获取脚本信息
//
yysRouter.get('/scripts/:scriptId', controller.script.fetchOneScripts); // 获取单一脚本信息
yysRouter
.
get
(
'/scripts/:scriptId'
,
controller
.
script
.
fetchOneScripts
);
// 获取单一脚本信息
yysRouter
.
get
(
'/help/:scriptId'
,
controller
.
script
.
fetchHelpInfo
);
// 获取帮助信息
yysRouter
.
get
(
'/help/:scriptId'
,
controller
.
script
.
fetchHelpInfo
);
// 获取帮助信息
yysRouter
.
get
(
'/notice/:scriptId'
,
controller
.
script
.
fetchNoticeInfo
);
// 获取提示信息
yysRouter
.
get
(
'/notice/:scriptId'
,
controller
.
script
.
fetchNoticeInfo
);
// 获取提示信息
...
@@ -40,6 +42,7 @@ module.exports = app => {
...
@@ -40,6 +42,7 @@ module.exports = app => {
yysRouter
.
post
(
'/getOrderSn'
,
controller
.
order
.
fetchOrderId
);
// 合作方获取订单号
yysRouter
.
post
(
'/getOrderSn'
,
controller
.
order
.
fetchOrderId
);
// 合作方获取订单号
yysRouter
.
post
(
'/getThxdData'
,
controller
.
order
.
partnerShow
);
// 合作方获取订单数据
yysRouter
.
post
(
'/getThxdData'
,
controller
.
order
.
partnerShow
);
// 合作方获取订单数据
yysRouter
.
post
(
'/getThxdReport'
,
controller
.
order
.
partnerShow
);
// 合作方获取订单报告
// yysRouter.get('/orderData/:appKey/:orderId', controller.order.orderShow);// 获取展示页面数据
// yysRouter.get('/orderData/:appKey/:orderId', controller.order.orderShow);// 获取展示页面数据
...
...
app/service/partner.js
View file @
3c72628f
...
@@ -120,11 +120,11 @@ class PartnerService extends Service {
...
@@ -120,11 +120,11 @@ class PartnerService extends Service {
return
ret
.
data
;
return
ret
.
data
;
}
}
async
notice
(
order
,
state
)
{
async
notice
(
order
,
state
,
Num
=
0
)
{
const
{
ctx
,
service
}
=
this
;
const
{
ctx
,
service
}
=
this
;
const
{
orderId
,
notifyUrl
,
userId
,
notice
}
=
order
;
const
{
orderId
,
notifyUrl
,
userId
}
=
order
;
const
dbRes
=
await
service
.
order
.
getOneByOrderId
({
orderId
,
notice
:
1
});
const
dbRes
=
await
service
.
order
.
getOneByOrderId
({
orderId
});
if
(
!
dbRes
&&
notifyUrl
&&
notice
!==
'1'
)
{
if
(
dbRes
&&
notifyUrl
&&
(
+
dbRes
.
notice
+
+
dbRes
.
text1
<
2
)
)
{
const
ret
=
await
ctx
.
curl
(
notifyUrl
,
{
const
ret
=
await
ctx
.
curl
(
notifyUrl
,
{
charset
:
'utf-8'
,
charset
:
'utf-8'
,
timeout
:
[
30000
,
30000
],
timeout
:
[
30000
,
30000
],
...
@@ -139,7 +139,11 @@ class PartnerService extends Service {
...
@@ -139,7 +139,11 @@ class PartnerService extends Service {
);
);
ctx
.
logger
.
info
(
`【Partner】 notice
${
notifyUrl
}
`
,
'orderId:'
,
orderId
,
'result:'
,
ret
.
status
,
JSON
.
stringify
(
ret
.
data
));
ctx
.
logger
.
info
(
`【Partner】 notice
${
notifyUrl
}
`
,
'orderId:'
,
orderId
,
'result:'
,
ret
.
status
,
JSON
.
stringify
(
ret
.
data
));
if
(
ret
.
status
===
200
)
{
if
(
ret
.
status
===
200
)
{
await
order
.
update
({
notice
:
'1'
});
if
(
Num
===
0
)
{
await
order
.
update
({
notice
:
1
});
}
else
{
await
order
.
update
({
text1
:
1
});
}
}
}
}
}
return
;
return
;
...
...
app/service/storage.js
View file @
3c72628f
...
@@ -48,7 +48,7 @@ class StorageService extends Service {
...
@@ -48,7 +48,7 @@ class StorageService extends Service {
method
:
'get'
,
method
:
'get'
,
contentType
:
'json'
,
contentType
:
'json'
,
});
});
ctx
.
logger
.
info
(
`【Storage】read url:
`
$
{
readUrl
}
$
{
orderId
}
`
write result:`
,
JSON
.
stringify
(
result
.
data
));
ctx
.
logger
.
info
(
`【Storage】read url:
${
readUrl
}${
orderId
}
write result:`
,
JSON
.
stringify
(
result
.
data
));
if
(
result
&&
result
.
data
&&
result
.
data
.
code
!==
0
)
{
if
(
result
&&
result
.
data
&&
result
.
data
.
code
!==
0
)
{
ctx
.
logger
.
error
(
`storageAPI read
${
readUrl
}${
orderId
}
`
,
JSON
.
stringify
(
result
.
data
));
ctx
.
logger
.
error
(
`storageAPI read
${
readUrl
}${
orderId
}
`
,
JSON
.
stringify
(
result
.
data
));
...
...
app/service/task.js
View file @
3c72628f
...
@@ -35,17 +35,34 @@ class TaskService extends Service {
...
@@ -35,17 +35,34 @@ class TaskService extends Service {
this
.
ctx
.
throw
(
400
,
{
message
:
result
.
data
.
msg
||
result
.
data
.
data
.
img
,
code
:
result
.
data
.
code
||
-
1
});
this
.
ctx
.
throw
(
400
,
{
message
:
result
.
data
.
msg
||
result
.
data
.
data
.
img
,
code
:
result
.
data
.
code
||
-
1
});
}
}
}
}
async
configs
()
{
const
{
taskAPI
,
ctx
}
=
this
;
const
{
configUrl
}
=
taskAPI
;
const
result
=
await
this
.
_request
(
configUrl
,
{
method
:
'get'
,
contentType
:
'json'
,
});
ctx
.
logger
.
info
(
`【Task】config
${
configUrl
}
params`
,
JSON
.
stringify
(
result
.
data
));
this
.
_checkSuccess
(
result
);
return
result
;
}
async
create
(
data
)
{
async
create
(
data
)
{
const
{
ctx
,
taskAPI
}
=
this
;
const
{
ctx
,
taskAPI
}
=
this
;
const
{
createTaskUrl
}
=
taskAPI
;
const
{
createTaskUrl
}
=
taskAPI
;
const
result
=
await
this
.
_request
(
createTaskUrl
,
{
const
result
=
await
this
.
_request
(
createTaskUrl
,
{
method
:
'post'
,
method
:
'post'
,
data
:
{
cityId
:
data
},
data
:
{
cityId
:
data
.
cityId
,
orderId
:
data
.
orderId
,
source
:
'yysH5new'
,
},
contentType
:
'json'
,
contentType
:
'json'
,
});
});
ctx
.
logger
.
info
(
`【Task】create
${
createTaskUrl
}
cityId:
${
data
}
result:`
,
JSON
.
stringify
(
result
.
data
));
ctx
.
logger
.
info
(
`【Task】create
${
createTaskUrl
}
cityId:
${
JSON
.
stringify
(
data
)}
result:`
,
JSON
.
stringify
(
result
.
data
.
code
));
this
.
_checkSuccess
(
result
);
this
.
_checkSuccess
(
result
);
return
result
.
data
.
data
.
taskId
;
return
result
.
data
.
data
;
}
}
async
fetchCapture
({
taskId
,
type
,
data
})
{
async
fetchCapture
({
taskId
,
type
,
data
})
{
...
@@ -95,20 +112,13 @@ class TaskService extends Service {
...
@@ -95,20 +112,13 @@ class TaskService extends Service {
async
phoneArea
(
phone
)
{
async
phoneArea
(
phone
)
{
const
{
ctx
,
phoneAreaAPI
}
=
this
;
const
{
ctx
,
phoneAreaAPI
}
=
this
;
const
{
bdhost
,
alhost
}
=
phoneAreaAPI
;
const
{
alhost
}
=
phoneAreaAPI
;
const
phoneInfo
=
{
const
phoneInfo
=
{
phone
,
phone
,
province
:
''
,
province
:
''
,
operator
:
''
,
operator
:
''
,
};
};
let
result
=
await
ctx
.
curl
(
bdhost
+
phone
,
{
const
result
=
await
ctx
.
curl
(
alhost
+
phone
,
{
method
:
'get'
,
timeout
:
[
3000
,
3000
],
dataType
:
'json'
,
});
ctx
.
logger
.
info
(
'phoneArea'
,
bdhost
+
phone
,
JSON
.
stringify
(
result
),
phone
);
if
(
result
.
status
!==
200
||
result
.
data
.
responseHeader
.
status
!==
200
||
!
result
.
data
.
response
[
phone
])
{
result
=
await
ctx
.
curl
(
alhost
+
phone
,
{
method
:
'get'
,
method
:
'get'
,
timeout
:
[
3000
,
3000
],
timeout
:
[
3000
,
3000
],
});
});
...
@@ -122,10 +132,6 @@ class TaskService extends Service {
...
@@ -122,10 +132,6 @@ class TaskService extends Service {
phoneInfo
.
province
=
html
.
match
(
/province:'
(
.*
?)
'/
)[
1
];
phoneInfo
.
province
=
html
.
match
(
/province:'
(
.*
?)
'/
)[
1
];
phoneInfo
.
operator
=
html
.
match
(
/catName:'
(
.*
?)
'/
)[
1
];
phoneInfo
.
operator
=
html
.
match
(
/catName:'
(
.*
?)
'/
)[
1
];
ctx
.
logger
.
info
(
'phoneArea'
,
alhost
+
phone
,
JSON
.
stringify
(
phoneInfo
),
html
,
phone
);
ctx
.
logger
.
info
(
'phoneArea'
,
alhost
+
phone
,
JSON
.
stringify
(
phoneInfo
),
html
,
phone
);
}
else
{
phoneInfo
.
province
=
result
.
data
.
response
[
phone
].
detail
.
province
;
phoneInfo
.
operator
=
result
.
data
.
response
[
phone
].
detail
.
operator
;
}
if
(
phoneInfo
.
province
===
'香港'
)
{
if
(
phoneInfo
.
province
===
'香港'
)
{
phoneInfo
.
province
=
'广东'
;
phoneInfo
.
province
=
'广东'
;
}
}
...
...
app/service/washData.js
View file @
3c72628f
...
@@ -8,6 +8,8 @@ class WashDataService extends Service {
...
@@ -8,6 +8,8 @@ class WashDataService extends Service {
const
{
config
}
=
this
;
const
{
config
}
=
this
;
this
.
washUrl
=
config
.
washAPI
.
host
+
config
.
washAPI
.
washUrl
;
this
.
washUrl
=
config
.
washAPI
.
host
+
config
.
washAPI
.
washUrl
;
this
.
callbackUrl
=
config
.
dataCallbackUrl
;
this
.
callbackUrl
=
config
.
dataCallbackUrl
;
this
.
newwashUrl
=
config
.
washAPI
.
newhost
+
config
.
washAPI
.
newwashUrl
;
this
.
newcallbackUrl
=
config
.
newdataCallbackUrl
;
}
}
async
wash
(
data
,
orderId
,
netMark
=
0
)
{
async
wash
(
data
,
orderId
,
netMark
=
0
)
{
const
{
app
,
washUrl
,
ctx
}
=
this
;
const
{
app
,
washUrl
,
ctx
}
=
this
;
...
@@ -32,6 +34,30 @@ class WashDataService extends Service {
...
@@ -32,6 +34,30 @@ class WashDataService extends Service {
}
}
return
washData
.
data
;
return
washData
.
data
;
}
}
async
newWash
(
data
,
orderId
,
netMark
=
0
)
{
const
{
app
,
newwashUrl
,
newcallbackUrl
,
ctx
}
=
this
;
const
rawdata
=
{
data
,
callbackUrl
:
newcallbackUrl
,
orderId
,
netMark
,
};
const
washData
=
await
app
.
curl
(
newwashUrl
,
{
charset
:
'utf-8'
,
timeout
:
[
3000
,
3000
],
dataType
:
'json'
,
data
:
rawdata
,
method
:
'post'
,
contentType
:
'json'
,
});
if
(
washData
.
status
!==
200
)
{
ctx
.
logger
.
error
(
`【newWashData】url
${
newwashUrl
}
,params`
,
rawdata
,
washData
);
throw
new
Error
(
'new清洗数据出错'
);
}
return
washData
.
data
;
}
}
}
module
.
exports
=
WashDataService
;
module
.
exports
=
WashDataService
;
config/config.local.js
View file @
3c72628f
...
@@ -9,7 +9,7 @@ module.exports = () => {
...
@@ -9,7 +9,7 @@ module.exports = () => {
config
.
redis
=
{
config
.
redis
=
{
client
:
{
client
:
{
port
:
6379
,
port
:
6379
,
host
:
'1
27.0.0.1
'
,
host
:
'1
16.62.55.137
'
,
password
:
'DEV8redis'
,
password
:
'DEV8redis'
,
db
:
0
,
db
:
0
,
},
},
...
@@ -22,11 +22,12 @@ module.exports = () => {
...
@@ -22,11 +22,12 @@ module.exports = () => {
};
};
config
.
taskAPI
=
{
config
.
taskAPI
=
{
host
:
'http://tm.51gjj.com:4829'
,
host
:
'https://uat-nginx.jianbing.com/scheduler-service/yys'
,
createTaskUrl
:
'/thxdServices/createThxdTask'
,
createTaskUrl
:
'/create'
,
fetchCodeUrl
:
'/thxdServices/queryThxdCode'
,
fetchCodeUrl
:
'/phonecode'
,
submitTaskUrl
:
'/thxdServices/queryThxd'
,
submitTaskUrl
:
'/query'
,
fetchTaskUrl
:
'/thxdServices/getThxdData'
,
fetchTaskUrl
:
'/data'
,
configUrl
:
'/configs'
,
};
};
config
.
partnerAPI
=
{
config
.
partnerAPI
=
{
...
@@ -73,6 +74,8 @@ module.exports = () => {
...
@@ -73,6 +74,8 @@ module.exports = () => {
config
.
washAPI
=
{
config
.
washAPI
=
{
host
:
'http://t.51gjj.com:3007'
,
host
:
'http://t.51gjj.com:3007'
,
washUrl
:
'/dataProcessing'
,
washUrl
:
'/dataProcessing'
,
newhost
:
'http://118.31.186.162:8050'
,
newwashUrl
:
'/newdataProcessing'
,
};
};
config
.
signatureAPI
=
{
config
.
signatureAPI
=
{
...
@@ -100,7 +103,7 @@ module.exports = () => {
...
@@ -100,7 +103,7 @@ module.exports = () => {
baseDir
:
'model'
,
baseDir
:
'model'
,
dialect
:
'mysql'
,
dialect
:
'mysql'
,
host
:
'rm-bp1272001633qc0x9o.mysql.rds.aliyuncs.com'
,
host
:
'rm-bp1272001633qc0x9o.mysql.rds.aliyuncs.com'
,
database
:
'data_service_
dev
'
,
database
:
'data_service_
uat
'
,
username
:
'hexin'
,
username
:
'hexin'
,
password
:
'gYUHszn9#q'
,
password
:
'gYUHszn9#q'
,
port
:
3306
,
port
:
3306
,
...
@@ -108,8 +111,9 @@ module.exports = () => {
...
@@ -108,8 +111,9 @@ module.exports = () => {
};
};
config
.
callbackUrl
=
'https://dev-nginx.jianbing.com/yysh5/callback'
;
config
.
callbackUrl
=
'https://uat-nginx.jianbing.com/yysh5/callback'
;
config
.
dataCallbackUrl
=
'https://dev-nginx.jianbing.com/yysh5/dataCallback'
;
config
.
dataCallbackUrl
=
'https://uat-nginx.jianbing.com/yysh5/dataCallback'
;
config
.
newdataCallbackUrl
=
'https://uat-nginx.jianbing.com/yysh5/newdataCallback'
;
return
config
;
return
config
;
};
};
config/config.prod.js
View file @
3c72628f
...
@@ -32,6 +32,14 @@ module.exports = () => {
...
@@ -32,6 +32,14 @@ module.exports = () => {
fetchTaskUrl
:
'/thxdServices/getThxdData'
,
fetchTaskUrl
:
'/thxdServices/getThxdData'
,
};
};
config
.
taskAPI
=
{
host
:
process
.
env
.
TASKAPI_HOST
,
createTaskUrl
:
'/create'
,
fetchCodeUrl
:
'/phonecode'
,
submitTaskUrl
:
'/query'
,
fetchTaskUrl
:
'/data'
,
};
config
.
scriptsAPI
=
{
config
.
scriptsAPI
=
{
host
:
process
.
env
.
SCRIPTSAPI_HOST
||
'https://uat-nginx.jianbing.com/zeus-api/v1'
,
host
:
process
.
env
.
SCRIPTSAPI_HOST
||
'https://uat-nginx.jianbing.com/zeus-api/v1'
,
fetchScriptsUrl
:
'/chaos/yys/two_dimension_array/queries'
,
fetchScriptsUrl
:
'/chaos/yys/two_dimension_array/queries'
,
...
...
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