Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Z
zhichan
Overview
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
蒋勇
zhichan
Commits
6c66bb08
Commit
6c66bb08
authored
Nov 15, 2019
by
王昆
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gsb
parent
8e475552
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
93 additions
and
0 deletions
+93
-0
bpo-web/app/base/api/impl/econtractApi.js
+90
-0
bpo-web/app/base/db/models/bankthreelog.js
+1
-0
bpo-web/app/base/service/impl/utilesignbaoSve.js
+2
-0
No files found.
bpo-web/app/base/api/impl/econtractApi.js
View file @
6c66bb08
...
...
@@ -430,6 +430,96 @@ class EcontractApi {
}
}
async
bankfour
(
obj
,
req
)
{
try
{
var
appId
=
obj
.
appId
;
var
userName
=
obj
.
userName
||
""
;
var
userIdNo
=
obj
.
userIdNo
||
""
;
var
userBankNo
=
obj
.
userBankNo
||
""
;
var
userMobile
=
obj
.
userMobile
||
""
;
var
nonceStr
=
obj
.
nonceStr
||
""
;
var
sign
=
obj
.
sign
||
""
;
var
btl
=
await
this
.
bankthreelogSve
.
create
({
appId
:
appId
,
userName
:
userName
,
userIdNo
:
userIdNo
,
userBankNo
:
userBankNo
,
userMobile
:
userMobile
,
nonceStr
:
nonceStr
,
sign
:
sign
,
use_esign
:
false
,
result
:
false
,
});
var
busi
=
await
this
.
ecompanybusiSve
.
findOne
({
appId
:
appId
});
if
(
!
busi
)
{
return
{
code
:
1001003
,
msg
:
"配置信息错误,请联系薪必果人员进行配置"
};
}
var
signArr
=
[];
signArr
.
push
(
"appId="
+
appId
);
signArr
.
push
(
"nonceStr="
+
nonceStr
);
signArr
.
push
(
"userBankNo="
+
userBankNo
);
signArr
.
push
(
"userIdNo="
+
userIdNo
);
signArr
.
push
(
"userMobile="
+
userMobile
);
signArr
.
push
(
"userName="
+
userName
);
signArr
.
push
(
"key="
+
busi
.
key
);
var
calcSign
=
md5
(
signArr
.
join
(
"&"
)).
toUpperCase
();
if
(
sign
!=
calcSign
)
{
return
{
code
:
1
,
msg
:
"签名失败"
};
}
var
bankParams
=
{
name
:
userName
,
//姓名 必填
idno
:
userIdNo
,
//身份证 必填
cardno
:
userBankNo
,
//银行卡 必填
mobile
:
userMobile
,
};
var
tt
=
await
this
.
utilesignbaoSve
.
bankfour
(
bankParams
,
"econtractapi.bankthree"
)
||
{};
// {"code":-110,"message":"手机号格式错误","data":{}}
//1成功,-110提示验证信息有误,-120亲,提供的信息不正确,请验证后再试!
console
.
log
(
"tt-----------------------------"
,
tt
);
btl
.
use_esign
=
true
;
if
(
tt
.
code
==
1
)
{
btl
.
result
=
true
;
btl
.
save
();
return
{
code
:
0
,
msg
:
"success"
};
}
else
if
(
tt
.
code
==
-
110
)
{
btl
.
result
=
false
;
btl
.
save
();
return
{
code
:
1002002
,
msg
:
tt
.
message
};
}
else
{
btl
.
result
=
false
;
btl
.
save
();
return
{
code
:
1002002
,
msg
:
tt
.
message
||
"银行四要素验证失败"
};
}
}
catch
(
error
)
{
return
{
code
:
500
,
msg
:
"接口异常"
};
}
}
async
dosync
(
obj
,
req
)
{
// TODO 需要验证一下合法
this
.
econtractSve
.
syncAllSigners
();
...
...
bpo-web/app/base/db/models/bankthreelog.js
View file @
6c66bb08
...
...
@@ -7,6 +7,7 @@ module.exports = (db, DataTypes) => {
userName
:
DataTypes
.
STRING
(
100
),
userIdNo
:
DataTypes
.
STRING
(
100
),
userBankNo
:
DataTypes
.
STRING
(
100
),
userMobile
:
DataTypes
.
STRING
(
30
),
nonceStr
:
DataTypes
.
STRING
(
100
),
sign
:
DataTypes
.
STRING
(
100
),
...
...
bpo-web/app/base/service/impl/utilesignbaoSve.js
View file @
6c66bb08
...
...
@@ -41,6 +41,7 @@ class UtilESignBaoService {
result
.
data
=
tResult
.
data
;
return
result
;
}
async
bankfour
(
params
,
opName
)
{
//四要素验证
var
result
=
{
code
:
1
,
...
...
@@ -67,6 +68,7 @@ class UtilESignBaoService {
result
.
data
=
tResult
.
data
;
return
result
;
}
//-------------------------------------------------------------------------e签宝银行四要素、三要素验证---结束----------------
...
...
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