Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gjjh5
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
gjjh5
Commits
bd5121aa
Commit
bd5121aa
authored
Mar 20, 2019
by
姜登
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gjjconfig
parent
28f0237d
Pipeline
#4732
passed with stage
in 12 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
27 additions
and
9 deletions
+27
-9
task.js
app/controller/task.js
+2
-2
scripts.js
app/service/scripts.js
+18
-2
config.local.js
config/config.local.js
+3
-2
config.prod.js
config/config.prod.js
+4
-3
No files found.
app/controller/task.js
View file @
bd5121aa
...
...
@@ -169,8 +169,8 @@ class TaskController extends Controller {
const
{
ctx
,
service
}
=
this
;
try
{
ctx
.
validate
(
this
.
cityListRule
);
await
service
.
signature
.
signatureCheck
(
ctx
.
request
.
body
);
const
result
=
await
service
.
scripts
.
getCityList
();
//
await service.signature.signatureCheck(ctx.request.body);
const
result
=
await
service
.
scripts
.
getCityList
(
ctx
.
request
.
body
);
ctx
.
body
=
result
;
return
;
}
catch
(
err
)
{
...
...
app/service/scripts.js
View file @
bd5121aa
...
...
@@ -16,6 +16,7 @@ class ScriptsService extends Service {
this
.
redisScriptsKey
=
scriptsAPI
.
redisScriptsKey
;
this
.
redisParamsKey
=
scriptsAPI
.
redisParamsKey
;
this
.
redisScriptListKey
=
scriptsAPI
.
redisScriptListKey
;
this
.
cityListUrl
=
scriptsAPI
.
cityListUrl
;
}
async
fetchScripts
()
{
...
...
@@ -181,8 +182,23 @@ class ScriptsService extends Service {
}
}
async
getCityList
()
{
// eslint-disable-next-line no-empty-function
async
getCityList
(
params
)
{
try
{
const
{
cityListUrl
,
ctx
}
=
this
;
const
result
=
await
ctx
.
curl
(
cityListUrl
,
{
charset
:
'utf-8'
,
timeout
:
[
'30s'
,
'30s'
],
dataType
:
'json'
,
contentType
:
'json'
,
method
:
'POST'
,
data
:
params
,
});
return
result
.
data
;
}
catch
(
err
)
{
this
.
ctx
.
logger
.
error
(
err
);
return
{
code
:
-
1
,
msg
:
'系统错误,请稍后重试'
};
}
}
}
...
...
config/config.local.js
View file @
bd5121aa
...
...
@@ -20,7 +20,7 @@ module.exports = () => {
createTaskUrl
:
'/gjjServices/createGjjTask'
,
fetchCodeUrl
:
'/gjjServices/queryGjjCode'
,
submitTaskUrl
:
'/gjjServices/queryGjj'
,
fetchTaskUrl
:
'/gjjServices/getGjjData'
fetchTaskUrl
:
'/gjjServices/getGjjData'
,
};
config
.
partnerAPI
=
{
...
...
@@ -32,7 +32,7 @@ module.exports = () => {
redisScriptsPrefix
:
'URANUS.HF.PARNTERS.SCRIPTS'
,
redisAgreementsPrefix
:
'URANUS.HF.PARNTERS.Agreements'
,
fetchInfo
:
'/chaos/partner'
,
redisInfoPrefix
:
'URANUS.HF.PARNTERS.Info'
,
redisInfoPrefix
:
'URANUS.HF.PARNTERS.Info'
,
};
config
.
scriptsAPI
=
{
...
...
@@ -48,6 +48,7 @@ module.exports = () => {
redisScriptsKey
:
'URANUS.HF.SCRIPTS'
,
redisParamsKey
:
'URANUS.HF.PARAMS'
,
redisScriptListKey
:
'URANUS.HF.SCRIPTLIST'
,
cityListUrl
:
'https://t.51gjj.com/gjj/getCityConfig'
,
};
config
.
storageAPI
=
{
...
...
config/config.prod.js
View file @
bd5121aa
...
...
@@ -38,7 +38,8 @@ module.exports = () => {
fetchScriptByCityNameUrl
:
'/chaos/hf/city_scripts'
,
redisScriptsKey
:
'URANUS.HF.SCRIPTS'
,
redisParamsKey
:
'URANUS.HF.PARAMS'
,
redisScriptListKey
:
'URANUS.HF.SCRIPTLIST'
,
redisScriptListKey
:
'URANUS.HF.SCRIPTLIST'
,
cityListUrl
:
'https://t.51gjj.com/gjj/getCityConfig'
,
};
config
.
storageAPI
=
{
...
...
@@ -61,7 +62,7 @@ module.exports = () => {
signatureUrl
:
'/Access/SignValidityCheck'
,
fetchParnterUrl
:
''
,
signatureType
:
'gjj'
,
customerUrl
:
'/customer/query'
,
customerUrl
:
'/customer/query'
,
};
config
.
partnerAPI
=
{
...
...
@@ -73,7 +74,7 @@ module.exports = () => {
redisScriptsPrefix
:
'URANUS.HF.PARNTERS.SCRIPTS'
,
redisAgreementsPrefix
:
'URANUS.HF.PARNTERS.Agreements'
,
fetchInfo
:
'/chaos/partner'
,
redisInfoPrefix
:
'URANUS.HF.PARNTERS.Info'
,
redisInfoPrefix
:
'URANUS.HF.PARNTERS.Info'
,
};
config
.
lockKeys
=
{
...
...
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