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
68ae12c0
Commit
68ae12c0
authored
Oct 23, 2020
by
王昆
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gsb
parent
f1ed8dd0
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
1 deletions
+10
-1
bpo-web/app/base/api/impl/innerApi.js
+8
-1
bpo-web/app/base/db/models/dkcontract.js
+1
-0
bpo-web/app/base/service/impl/dkcontractSve.js
+1
-0
No files found.
bpo-web/app/base/api/impl/innerApi.js
View file @
68ae12c0
...
@@ -111,6 +111,7 @@ class innerApi {
...
@@ -111,6 +111,7 @@ class innerApi {
async
appFaceAuth
(
obj
,
req
)
{
async
appFaceAuth
(
obj
,
req
)
{
try
{
try
{
let
accountId
=
this
.
trim
(
obj
.
accountId
);
let
accountId
=
this
.
trim
(
obj
.
accountId
);
let
appKey
=
this
.
trim
(
obj
.
appKey
);
let
account
=
await
this
.
usereaccountSve
.
findById
(
accountId
);
let
account
=
await
this
.
usereaccountSve
.
findById
(
accountId
);
if
(
!
account
)
{
if
(
!
account
)
{
return
system
.
getErrResult2
(
"账户不存在"
);
return
system
.
getErrResult2
(
"账户不存在"
);
...
@@ -127,6 +128,7 @@ class innerApi {
...
@@ -127,6 +128,7 @@ class innerApi {
notifyUrl
:
obj
.
notifyUrl
||
"https://bpohhr.gongsibao.com/api/econtractApi/transferNotify"
,
notifyUrl
:
obj
.
notifyUrl
||
"https://bpohhr.gongsibao.com/api/econtractApi/transferNotify"
,
// sysNotifyUrl: "https://bpohhr.gongsibao.com/api/econtractApi/transferNotify",
// sysNotifyUrl: "https://bpohhr.gongsibao.com/api/econtractApi/transferNotify",
sysNotifyUrl
:
"https://bpohhr.gongsibao.com/api/innerApi/faceAuthNotify"
,
sysNotifyUrl
:
"https://bpohhr.gongsibao.com/api/innerApi/faceAuthNotify"
,
appKey
:
appKey
},
},
});
});
authRes
=
authRes
.
data
;
authRes
=
authRes
.
data
;
...
@@ -220,12 +222,13 @@ class innerApi {
...
@@ -220,12 +222,13 @@ class innerApi {
* @returns {Promise<{msg: string, data: *, status: number}>}
* @returns {Promise<{msg: string, data: *, status: number}>}
*/
*/
async
appHandSign
(
obj
,
req
)
{
async
appHandSign
(
obj
,
req
)
{
let
mchtId
,
accountId
,
notifyUrl
,
val
,
key
;
let
mchtId
,
accountId
,
notifyUrl
,
val
,
key
,
appKey
;
try
{
try
{
await
this
.
valid
(
obj
,
req
);
await
this
.
valid
(
obj
,
req
);
accountId
=
this
.
trim
(
obj
.
accountId
);
accountId
=
this
.
trim
(
obj
.
accountId
);
mchtId
=
this
.
trim
(
obj
.
mchtId
);
mchtId
=
this
.
trim
(
obj
.
mchtId
);
notifyUrl
=
this
.
trim
(
obj
.
notifyUrl
);
notifyUrl
=
this
.
trim
(
obj
.
notifyUrl
);
appKey
=
this
.
trim
(
obj
.
appKey
);
key
=
`
${
mchtId
}
_
${
accountId
}
`
;
key
=
`
${
mchtId
}
_
${
accountId
}
`
;
val
=
uuidv4
();
val
=
uuidv4
();
...
@@ -255,6 +258,7 @@ class innerApi {
...
@@ -255,6 +258,7 @@ class innerApi {
notifyUrl
:
notifyUrl
,
notifyUrl
:
notifyUrl
,
noticeUrl
:
"https://bpohhr.gongsibao.com/api/innerApi/appHandSignNotice"
,
noticeUrl
:
"https://bpohhr.gongsibao.com/api/innerApi/appHandSignNotice"
,
callbackUrl
:
obj
.
callbackUrl
||
"https://bpohhr.gongsibao.com/blank"
,
callbackUrl
:
obj
.
callbackUrl
||
"https://bpohhr.gongsibao.com/blank"
,
appKey
:
appKey
});
});
if
(
res
.
status
===
0
)
{
if
(
res
.
status
===
0
)
{
...
@@ -298,6 +302,9 @@ class innerApi {
...
@@ -298,6 +302,9 @@ class innerApi {
let
notifyResult
=
await
axios
({
let
notifyResult
=
await
axios
({
method
:
'post'
,
method
:
'post'
,
url
:
contract
.
notify_url
,
url
:
contract
.
notify_url
,
headers
:
{
'XAPPKEY'
:
this
.
trim
(
contract
.
app_key
),
},
data
:
{
data
:
{
contractId
:
contract
.
id
,
contractId
:
contract
.
id
,
accountId
:
contract
.
usereaccount_id
,
accountId
:
contract
.
usereaccount_id
,
...
...
bpo-web/app/base/db/models/dkcontract.js
View file @
68ae12c0
...
@@ -34,6 +34,7 @@ module.exports = (db, DataTypes) => {
...
@@ -34,6 +34,7 @@ module.exports = (db, DataTypes) => {
end_at
:
DataTypes
.
DATE
,
end_at
:
DataTypes
.
DATE
,
notify_url
:
DataTypes
.
STRING
,
notify_url
:
DataTypes
.
STRING
,
app_key
:
DataTypes
.
STRING
,
},{
},{
paranoid
:
true
,
//假的删除
paranoid
:
true
,
//假的删除
underscored
:
true
,
underscored
:
true
,
...
...
bpo-web/app/base/service/impl/dkcontractSve.js
View file @
68ae12c0
...
@@ -886,6 +886,7 @@ class DKcontractService extends ServiceBase {
...
@@ -886,6 +886,7 @@ class DKcontractService extends ServiceBase {
esignUrl
:
""
,
esignUrl
:
""
,
eflowstatus
:
"1"
,
eflowstatus
:
"1"
,
notify_url
:
params
.
notifyUrl
,
notify_url
:
params
.
notifyUrl
,
app_key
:
params
.
appKey
,
}
}
dkcontract
=
await
this
.
create
(
dkcontract
);
dkcontract
=
await
this
.
create
(
dkcontract
);
...
...
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