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
Show 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
>
<
template
>
<view
class=
"content"
>
<view
class=
"content"
>
<template
v-if=
"isCertified"
>
<!--
<template
v-if=
"isCertified"
>
<uni-list
>
<uni-list
>
<uni-list-item
class=
"item"
title=
"姓名1"
:rightText=
"realName"
></uni-list-item>
<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-item
class=
"item"
title=
"身份证号码"
:rightText=
"idCard"
></uni-list-item>
</uni-list>
</uni-list>
</
template
>
</
template
>
<
template
v-else
>
<
template
v-else
>
-->
<uni-frv-external-realname
ref=
"frv"
@
start=
"startVerify"
@
finish=
"verifyFinish"
></uni-frv-external-realname>
<uni-frv-external-realname
ref=
"frv"
@
start=
"startVerify"
@
finish=
"verifyFinish"
></uni-frv-external-realname>
<
/
template
>
<
!--
</
template
>
--
>
</view>
</view>
</template>
</template>
...
@@ -22,14 +22,18 @@ export default {
...
@@ -22,14 +22,18 @@ export default {
idCard
:
''
,
idCard
:
''
,
ossData
:
null
,
ossData
:
null
,
certifyId
:
''
,
certifyId
:
''
,
MetaInfo
:
null
MetaInfo
:
null
,
eventChannel
:
null
,
}
}
},
},
onLoad
()
{
onLoad
()
{
this
.
eventChannel
=
this
.
getOpenerEventChannel
()
this
.
MetaInfo
=
uni
.
getFacialRecognitionMetaInfo
()
const
{
idCard
,
realName
}
=
uni
.
getStorageSync
(
'userFData'
)
const
{
idCard
,
realName
}
=
uni
.
getStorageSync
(
'userFData'
)
this
.
realName
=
realName
this
.
realName
=
realName
this
.
idCard
=
idCard
this
.
idCard
=
idCard
this
.
initOss
()
this
.
initOss
()
this
.
startVerifys
()
},
},
methods
:
{
methods
:
{
initOss
(){
initOss
(){
...
@@ -40,21 +44,52 @@ export default {
...
@@ -40,21 +44,52 @@ export default {
fileType
:
FilePath
,
fileType
:
FilePath
,
}
}
self
.
$request
(
'/app/v1/oss'
,
'GET'
,
params
).
then
(
res
=>
{
self
.
$request
(
'/app/v1/oss'
,
'GET'
,
params
).
then
(
res
=>
{
//
console.log(res.result,'oss')
console
.
log
(
res
.
result
,
'oss'
)
self
.
ossData
=
res
.
result
self
.
ossData
=
res
.
result
}).
catch
(
err
=>
{
}).
catch
(
err
=>
{
console
.
log
(
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'
)
console
.
log
(
'44325'
)
// {realName,idCard,metaInfo}
const
self
=
this
const
self
=
this
const
params
=
{
const
params
=
{
appId
:
'__UNI__DE04B13'
,
appId
:
'__UNI__DE04B13'
,
realName
:
realName
,
realName
:
self
.
realName
,
idCard
:
idCard
,
idCard
:
self
.
idCard
,
metaInfo
:
m
etaInfo
metaInfo
:
self
.
M
etaInfo
}
}
console
.
log
(
params
,
'params'
)
console
.
log
(
params
,
'params'
)
self
.
$request
(
'/app/v1/ocrTokenByUni'
,
'POST'
,
params
).
then
(
res
=>
{
self
.
$request
(
'/app/v1/ocrTokenByUni'
,
'POST'
,
params
).
then
(
res
=>
{
...
@@ -84,8 +119,11 @@ export default {
...
@@ -84,8 +119,11 @@ export default {
self
.
$request
(
'/app/v1/resultByUni'
,
'POST'
,
params
).
then
(
res
=>
{
self
.
$request
(
'/app/v1/resultByUni'
,
'POST'
,
params
).
then
(
res
=>
{
console
.
log
(
res
,
'resultByUni'
)
console
.
log
(
res
,
'resultByUni'
)
const
{
ocrToken
}
=
res
.
result
const
{
ocrToken
}
=
res
.
result
UploadFile
(
self
.
ossData
,
`data:image/png;base64,
${
ocrToken
.
photo
}
`
).
then
(
file
=>
{
UploadFile
(
self
.
ossData
,
`data:image/jpg;base64,
${
ocrToken
.
photo
}
`
).
then
(
file
=>
{
console
.
log
(
file
)
console
.
log
(
file
.
fileUrl
)
uni
.
setStorageSync
(
'fileUrlFace'
,
file
.
fileUrl
)
this
.
eventChannel
.
emit
(
'send'
,
JSON
.
stringify
(
file
.
fileUrl
))
self
.
Back
()
})
})
}).
catch
(
err
=>
{
}).
catch
(
err
=>
{
console
.
log
(
err
,
'请求出错'
)
console
.
log
(
err
,
'请求出错'
)
...
...
pages/web/web.vue
View file @
df268d7e
...
@@ -470,7 +470,6 @@ export default {
...
@@ -470,7 +470,6 @@ export default {
const
that
=
this
;
const
that
=
this
;
try
{
try
{
CheckUniFace
((
data
)
=>
{
CheckUniFace
((
data
)
=>
{
console
.
log
(
data
,
'uni_Face'
)
that
.
GetWebView
().
evalJS
(
`receiveUniFace('
${
JSON
.
stringify
(
data
)}
')`
)
that
.
GetWebView
().
evalJS
(
`receiveUniFace('
${
JSON
.
stringify
(
data
)}
')`
)
})
})
}
catch
(
err
){
}
catch
(
err
){
...
...
pages/web/websrc.vue
View file @
df268d7e
...
@@ -463,10 +463,8 @@ export default {
...
@@ -463,10 +463,8 @@ export default {
const
that
=
this
;
const
that
=
this
;
try
{
try
{
CheckUniFace
((
data
)
=>
{
CheckUniFace
((
data
)
=>
{
console
.
log
(
data
,
'uni_Face'
)
that
.
GetWebView
().
evalJS
(
`receiveUniFace('
${
JSON
.
stringify
(
data
)}
')`
)
that
.
GetWebView
().
evalJS
(
`receiveUniFace('
${
JSON
.
stringify
(
data
)}
')`
)
})
})
}
catch
(
err
){
}
catch
(
err
){
console
.
log
(
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 @@
...
@@ -10,7 +10,7 @@
<button
type=
"primary"
@
click=
"_retry"
v-else
>
返回
</button>
<button
type=
"primary"
@
click=
"_retry"
v-else
>
返回
</button>
<view
class=
"dev-tip"
v-if=
"isDev"
>
请在控制台查看详细错误(此提示仅在开发环境展示)
</view>
<view
class=
"dev-tip"
v-if=
"isDev"
>
请在控制台查看详细错误(此提示仅在开发环境展示)
</view>
</
template
>
</
template
>
<
template
v-else
>
<!--
<template v-else>
<text class="title">实名认证</text>
<text class="title">实名认证</text>
<uni-forms>
<uni-forms>
<uni-forms-item name="realName">
<uni-forms-item name="realName">
...
@@ -35,7 +35,7 @@
...
@@ -35,7 +35,7 @@
</view>
</view>
</view>
</view>
<button type="primary" :disabled="!certifyIdNext" @click="_getCertifyId">确定</button>
<button type="primary" :disabled="!certifyIdNext" @click="_getCertifyId">确定</button>
</
template
>
</template>
-->
</view>
</view>
</template>
</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