Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
5
51business
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
方斌
51business
Commits
2eda1e65
Commit
2eda1e65
authored
Sep 11, 2019
by
Hsinli
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
addd
parent
63d43c0f
Pipeline
#13662
passed with stage
in 25 seconds
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
common.js
app/service/credit/common.js
+7
-3
No files found.
app/service/credit/common.js
View file @
2eda1e65
...
@@ -4,6 +4,10 @@
...
@@ -4,6 +4,10 @@
const
Service
=
require
(
'egg'
).
Service
;
const
Service
=
require
(
'egg'
).
Service
;
const
moment
=
require
(
'moment'
);
const
moment
=
require
(
'moment'
);
const
_
=
require
(
'lodash'
);
const
_
=
require
(
'lodash'
);
const
TypeConfig
=
{
blacklist
:
1
,
callrisk
:
2
}
class
CommonService
extends
Service
{
class
CommonService
extends
Service
{
...
@@ -251,7 +255,7 @@ class CommonService extends Service {
...
@@ -251,7 +255,7 @@ class CommonService extends Service {
*/
*/
async
queryShuhemofang
(
type
,
data
)
{
async
queryShuhemofang
(
type
,
data
)
{
const
{
ctx
}
=
this
;
const
{
ctx
}
=
this
;
if
(
[
'blacklist'
,
'callrisk'
].
includes
(
type
))
{
if
(
!
TypeConfig
.
hasOwnProperty
(
type
))
{
ctx
.
failed
(
'未知类型的数据检测'
);
ctx
.
failed
(
'未知类型的数据检测'
);
}
}
let
need
=
[
'name'
,
'id_card'
,
'phone'
];
let
need
=
[
'name'
,
'id_card'
,
'phone'
];
...
@@ -262,7 +266,7 @@ class CommonService extends Service {
...
@@ -262,7 +266,7 @@ class CommonService extends Service {
}
}
let
ret
=
await
this
.
requestShuhemofang
(
data
);
let
ret
=
await
this
.
requestShuhemofang
(
data
);
let
shuhemofangData
=
{
let
shuhemofangData
=
{
type
:
type
===
'blacklist'
?
1
:
2
,
type
:
TypeConfig
[
type
]
,
user_id
:
ctx
.
userId
,
user_id
:
ctx
.
userId
,
app_user_id
:
ctx
.
appUserId
,
app_user_id
:
ctx
.
appUserId
,
app_id
:
ctx
.
appId
,
app_id
:
ctx
.
appId
,
...
@@ -324,7 +328,7 @@ class CommonService extends Service {
...
@@ -324,7 +328,7 @@ class CommonService extends Service {
*/
*/
async
shuhemofangCheck
(
type
,
inputParams
)
{
async
shuhemofangCheck
(
type
,
inputParams
)
{
const
{
ctx
}
=
this
;
const
{
ctx
}
=
this
;
if
(
[
'blacklist'
,
'callrisk'
].
includes
(
type
))
{
if
(
!
TypeConfig
.
hasOwnProperty
(
type
))
{
ctx
.
failed
(
'未知类型的数据检测'
);
ctx
.
failed
(
'未知类型的数据检测'
);
}
}
//1:判断用户当前三要素是否已经校验过
//1:判断用户当前三要素是否已经校验过
...
...
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