Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cust_web
Project
Project
Details
Activity
Releases
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
张伯涛
cust_web
Commits
e262418f
Commit
e262418f
authored
Jan 14, 2025
by
liwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增了html页面
parent
6574f147
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
43 additions
and
3 deletions
+43
-3
realAuth.html
public/realAuth.html
+2
-3
realAuthDetail.html
public/realAuthDetail.html
+41
-0
No files found.
public/
test
.html
→
public/
realAuth
.html
View file @
e262418f
...
...
@@ -28,7 +28,7 @@
}
console
.
log
(
'JSON.stringify(MetaInfo):'
,
JSON
.
stringify
(
MetaInfo
))
// 请求认证业务接口获取CertifyUrl
fetch
(
'http://
localhost
:8092/faceVerify/initFaceVerify'
,
{
fetch
(
'http://
192.168.1.7
:8092/faceVerify/initFaceVerify'
,
{
method
:
'POST'
,
headers
:
{
'Content-Type'
:
'application/json'
,
...
...
@@ -38,9 +38,8 @@
})
.
then
(
response
=>
response
.
json
())
.
then
(
data
=>
{
console
.
log
(
'data:'
,
data
)
// 获取CertifyUrl后跳转至认证页面
window
.
location
.
href
=
data
.
resultObject
.
certifyUrl
;
window
.
location
.
href
=
data
.
data
.
certifyUrl
;
});
</script>
</body>
...
...
public/realAuthDetail.html
0 → 100644
View file @
e262418f
<!DOCTYPE HTML>
<html
lang=
"en"
>
<head>
<meta
charset=
"utf-8"
>
<title>
Title
</title>
</head>
<body>
<div>
222222
</div>
<script>
// 此时的window.location.href就是ReturnUrl了。
// 格式为:https://aliyundoc.com 或 https://aliyundoc.com/index.html
let
url
=
new
URL
(
window
.
location
.
href
);
// 获取返回的认证结果数据。
let
parms
=
url
.
searchParams
.
get
(
'response'
)
console
.
log
(
'parms:'
,
parms
)
// 如果需要二次验证实人认证结果可参考下面代码。
// 获取CertifyId 为了避免盗链和篡改风险,请自行管理此ID和真实认证人的关系。
var
certifyId
=
JSON
.
parse
(
parms
).
extInfo
.
certifyId
function
describe
()
{
// 携带CertifyId
fetch
(
'http://获取认证详细数据接口地址'
,
{
method
:
'POST'
,
headers
:
{
'Content-Type'
:
'application/json'
},
body
:
certifyId
})
.
then
(
response
=>
{
console
.
log
(
'res'
,
response
)
return
response
.
json
()
})
.
then
(
data
=>
{
console
.
log
(
'data'
,
data
)
document
.
getElementById
(
'detail'
).
innerHTML
=
JSON
.
stringify
(
data
)
})
}
</script>
</body>
</html>
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