Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
U
uni-app-ddh-shop
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
zhanhai
uni-app-ddh-shop
Commits
df268d7e
Commit
df268d7e
authored
Oct 31, 2024
by
caimeng
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'auth-dev' of
ssh://gitlab.jqtianxia.cn:2222/zhanhai/uni-app-ddh-shop
into auth-dev
parents
af65a8bb
c2c52f98
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
12090 additions
and
4794 deletions
+12090
-4794
face.vue
pages/web/face.vue
+49
-11
web.vue
pages/web/web.vue
+0
-1
websrc.vue
pages/web/websrc.vue
+0
-2
uni-frv-external-realname.vue
...s/uni-frv-external-realname/uni-frv-external-realname.vue
+2
-2
app-service.js
unpackage/dist/dev/app-plus/app-service.js
+10636
-3955
app-view.js
unpackage/dist/dev/app-plus/app-view.js
+1403
-823
No files found.
pages/web/face.vue
View file @
df268d7e
<
template
>
<view
class=
"content"
>
<template
v-if=
"isCertified"
>
<!--
<template
v-if=
"isCertified"
>
<uni-list
>
<uni-list-item
class=
"item"
title=
"姓名1"
:rightText=
"realName"
></uni-list-item>
<uni-list-item
class=
"item"
title=
"身份证号码"
:rightText=
"idCard"
></uni-list-item>
</uni-list>
</
template
>
<
template
v-else
>
<
template
v-else
>
-->
<uni-frv-external-realname
ref=
"frv"
@
start=
"startVerify"
@
finish=
"verifyFinish"
></uni-frv-external-realname>
<
/
template
>
<
!--
</
template
>
--
>
</view>
</template>
...
...
@@ -22,14 +22,18 @@ export default {
idCard
:
''
,
ossData
:
null
,
certifyId
:
''
,
MetaInfo
:
null
MetaInfo
:
null
,
eventChannel
:
null
,
}
},
onLoad
()
{
this
.
eventChannel
=
this
.
getOpenerEventChannel
()
this
.
MetaInfo
=
uni
.
getFacialRecognitionMetaInfo
()
const
{
idCard
,
realName
}
=
uni
.
getStorageSync
(
'userFData'
)
this
.
realName
=
realName
this
.
idCard
=
idCard
this
.
initOss
()
this
.
startVerifys
()
},
methods
:
{
initOss
(){
...
...
@@ -40,21 +44,52 @@ export default {
fileType
:
FilePath
,
}
self
.
$request
(
'/app/v1/oss'
,
'GET'
,
params
).
then
(
res
=>
{
//
console.log(res.result,'oss')
console
.
log
(
res
.
result
,
'oss'
)
self
.
ossData
=
res
.
result
}).
catch
(
err
=>
{
console
.
log
(
err
,
'请求出错'
)
})
},
async
startVerify
({
realName
,
idCard
,
metaInfo
})
{
startVerifys
()
{
console
.
log
(
'44325'
)
// {realName,idCard,metaInfo}
const
self
=
this
const
params
=
{
appId
:
'__UNI__DE04B13'
,
realName
:
self
.
realName
,
idCard
:
self
.
idCard
,
metaInfo
:
self
.
MetaInfo
}
console
.
log
(
params
,
'params'
)
self
.
$request
(
'/app/v1/ocrTokenByUni'
,
'POST'
,
params
).
then
(
res
=>
{
const
{
ocrToken
}
=
res
.
result
console
.
log
(
res
.
result
)
if
(
ocrToken
.
certifyId
){
self
.
certifyId
=
ocrToken
.
certifyId
self
.
$refs
.
frv
.
startFacialRecognitionVerify
(
ocrToken
.
certifyId
)
}
else
{
const
{
message
}
=
ocrToken
.
error
uni
.
showToast
({
title
:
message
,
icon
:
"none"
,
})
}
}).
catch
(
err
=>
{
console
.
log
(
err
,
'请求出错'
)
})
},
async
startVerify
()
{
console
.
log
(
'44325'
)
// {realName,idCard,metaInfo}
const
self
=
this
const
params
=
{
appId
:
'__UNI__DE04B13'
,
realName
:
realName
,
idCard
:
idCard
,
metaInfo
:
m
etaInfo
realName
:
self
.
realName
,
idCard
:
self
.
idCard
,
metaInfo
:
self
.
M
etaInfo
}
console
.
log
(
params
,
'params'
)
self
.
$request
(
'/app/v1/ocrTokenByUni'
,
'POST'
,
params
).
then
(
res
=>
{
...
...
@@ -84,8 +119,11 @@ export default {
self
.
$request
(
'/app/v1/resultByUni'
,
'POST'
,
params
).
then
(
res
=>
{
console
.
log
(
res
,
'resultByUni'
)
const
{
ocrToken
}
=
res
.
result
UploadFile
(
self
.
ossData
,
`data:image/png;base64,
${
ocrToken
.
photo
}
`
).
then
(
file
=>
{
console
.
log
(
file
)
UploadFile
(
self
.
ossData
,
`data:image/jpg;base64,
${
ocrToken
.
photo
}
`
).
then
(
file
=>
{
console
.
log
(
file
.
fileUrl
)
uni
.
setStorageSync
(
'fileUrlFace'
,
file
.
fileUrl
)
this
.
eventChannel
.
emit
(
'send'
,
JSON
.
stringify
(
file
.
fileUrl
))
self
.
Back
()
})
}).
catch
(
err
=>
{
console
.
log
(
err
,
'请求出错'
)
...
...
pages/web/web.vue
View file @
df268d7e
...
...
@@ -470,7 +470,6 @@ export default {
const
that
=
this
;
try
{
CheckUniFace
((
data
)
=>
{
console
.
log
(
data
,
'uni_Face'
)
that
.
GetWebView
().
evalJS
(
`receiveUniFace('
${
JSON
.
stringify
(
data
)}
')`
)
})
}
catch
(
err
){
...
...
pages/web/websrc.vue
View file @
df268d7e
...
...
@@ -463,10 +463,8 @@ export default {
const
that
=
this
;
try
{
CheckUniFace
((
data
)
=>
{
console
.
log
(
data
,
'uni_Face'
)
that
.
GetWebView
().
evalJS
(
`receiveUniFace('
${
JSON
.
stringify
(
data
)}
')`
)
})
}
catch
(
err
){
console
.
log
(
err
,
'获取人脸失败'
)
}
...
...
uni_modules/uni-frv-external/components/uni-frv-external-realname/uni-frv-external-realname.vue
View file @
df268d7e
...
...
@@ -10,7 +10,7 @@
<button
type=
"primary"
@
click=
"_retry"
v-else
>
返回
</button>
<view
class=
"dev-tip"
v-if=
"isDev"
>
请在控制台查看详细错误(此提示仅在开发环境展示)
</view>
</
template
>
<
template
v-else
>
<!--
<template v-else>
<text class="title">实名认证</text>
<uni-forms>
<uni-forms-item name="realName">
...
...
@@ -35,7 +35,7 @@
</view>
</view>
<button type="primary" :disabled="!certifyIdNext" @click="_getCertifyId">确定</button>
</
template
>
</template>
-->
</view>
</template>
...
...
unpackage/dist/dev/app-plus/app-service.js
View file @
df268d7e
This diff is collapsed.
Click to expand it.
unpackage/dist/dev/app-plus/app-view.js
View file @
df268d7e
This diff is collapsed.
Click to expand it.
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