Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
H
hls-xcmg-vue-app
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
xugong
hls-xcmg-vue-app
Commits
62aca5b5
Commit
62aca5b5
authored
Oct 14, 2019
by
24776
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' of hel.hand-china.com:xugong/hls-xcmg-vue-app
into develop
parents
c6179b4e
cd93bc20
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
44 additions
and
21 deletions
+44
-21
naturePerson.vue
src/pages/userBind/np/naturePerson.vue
+44
-21
No files found.
src/pages/userBind/np/naturePerson.vue
View file @
62aca5b5
...
...
@@ -46,18 +46,18 @@
<div
class=
"upload-id-card"
>
<span>
身份证照片上传
</span>
<div
class=
"upload-box"
>
<div
v-if=
"!idCardFront"
@
click=
"
idCardshow(
'front')"
>
<div
v-if=
"!idCardFront"
@
click=
"
ocrShow('idCard',
'front')"
>
<img
src=
"@/assets/userBind/front.png"
>
<p>
正面
</p>
</div>
<div
v-if=
"idCardFront && !isApproved"
@
click=
"
idCardshow(
'front')"
>
<div
v-if=
"idCardFront && !isApproved"
@
click=
"
ocrShow('idCard',
'front')"
>
<img
:src=
"idCardFront"
style=
"width: 100%;height: 100%;margin: 0"
>
</div>
<div
v-if=
"!idCardBack"
@
click=
"
idCardshow(
'back')"
>
<div
v-if=
"!idCardBack"
@
click=
"
ocrShow('idCard',
'back')"
>
<img
src=
"@/assets/userBind/back.png"
>
<p>
反面
</p>
</div>
<div
v-if=
"idCardBack && !isApproved"
@
click=
"
idCardshow(
'back')"
>
<div
v-if=
"idCardBack && !isApproved"
@
click=
"
ocrShow('idCard',
'back')"
>
<img
:src=
"idCardBack"
style=
"width: 100%;height: 100%;margin: 0"
>
</div>
</div>
...
...
@@ -215,11 +215,12 @@
<span>
添加银行卡
</span>
<img
src=
"@/assets/userBind/close.png"
@
click=
"hideModal"
>
</div>
<img
src=
"@/assets/userBind/addBack.png"
class=
"addBack"
>
<img
v-if=
"!bankImg"
src=
"@/assets/userBind/addBack.png"
class=
"addBack"
@
click=
"ocrShow('bankCard', '')"
>
<img
v-if=
"bankImg && !isApproved"
:src=
"bankImg"
class=
"addBack"
>
<list-item
:item-height=
"44"
class=
"card-Info"
>
<item>
<div
slot=
"name"
>
银行卡卡号
</div>
<input
slot=
"content"
v-model=
"bank.bank_account_num"
placeholder=
"银行卡卡号
自动填充"
>
<input
slot=
"content"
v-model=
"bank.bank_account_num"
readonly
placeholder=
"识别银行卡
自动填充"
>
</item>
<item>
<div
slot=
"name"
>
账户姓名
</div>
...
...
@@ -227,7 +228,7 @@
</item>
<item>
<div
slot=
"name"
>
银行名称
</div>
<input
slot=
"content"
v-model=
"bank.bank_full_name"
placeholder=
"请输入银行名称
"
>
<input
slot=
"content"
v-model=
"bank.bank_full_name"
readonly
placeholder=
"识别银行卡自动填充
"
>
</item>
<item>
<div
slot=
"name"
>
支行名称
</div>
...
...
@@ -277,7 +278,7 @@ export default {
bank
:
{
bank_account_num
:
''
,
bank_account_name
:
''
,
bank_card_type
:
'
信用卡
'
,
bank_card_type
:
''
,
bank_full_name
:
''
,
bank_branch_name
:
''
,
},
...
...
@@ -314,6 +315,7 @@ export default {
},
idCardFront
:
''
,
// 身份证正面图片
idCardBack
:
''
,
// 身份证反面图片
bankImg
:
''
,
// 银行卡图片
}
},
watch
:
{
...
...
@@ -337,12 +339,12 @@ export default {
}
},
tabNum
:
function
(
newVal
,
oldVal
)
{
if
(
/*
if (
(newVal === 1 && !this.isSave) && !this.from
) {
this.hlsPopup.showError('请先保存基本信息')
this.tabNum = oldVal
}
}
*/
},
'baseInfo.marital_status_n'
:
function
(
newVal
,
oldVal
)
{
if
(
newVal
===
'已婚'
)
{
...
...
@@ -471,21 +473,21 @@ export default {
}
})
},
idCardshow
(
type
)
{
ocrShow
(
ocrType
,
type
)
{
let
vm
=
this
hlsPopup
.
showActionSheet
({
titleText
:
'请选择照片'
,
buttonArray
:
[
'拍照'
,
'从相册取'
],
callback
:
index
=>
{
if
(
index
===
0
)
{
vm
.
openCamera
(
type
)
vm
.
openCamera
(
ocrType
,
type
)
}
else
{
vm
.
takePicture
(
type
)
vm
.
takePicture
(
ocrType
,
type
)
}
},
})
},
openCamera
(
type
)
{
openCamera
(
ocrType
,
type
)
{
let
vm
=
this
let
cameraoptions
=
{
quality
:
60
,
...
...
@@ -493,15 +495,20 @@ export default {
height
:
1382
,
}
let
success
=
function
(
imgdata
)
{
if
(
ocrType
===
'idCard'
)
{
type
===
'front'
?
vm
.
idCardFront
=
imgdata
:
vm
.
idCardBack
=
imgdata
vm
.
idCardIdentify
(
imgdata
)
}
else
if
(
ocrType
===
'bankCard'
)
{
vm
.
bankImg
=
imgdata
vm
.
bankCardIdentify
(
imgdata
)
}
}
let
error
=
function
()
{
hlsPopup
.
showLongCenter
(
error
)
}
hlsUtil
.
openCamera
(
cameraoptions
,
success
,
error
)
},
takePicture
(
type
)
{
takePicture
(
ocrType
,
type
)
{
let
vm
=
this
var
cameraoptions
=
{
quality
:
70
,
...
...
@@ -510,8 +517,13 @@ export default {
maxCount
:
1
,
}
let
success
=
function
(
imgUrl
)
{
if
(
ocrType
===
'idCard'
)
{
type
===
'front'
?
vm
.
idCardFront
=
imgUrl
[
0
]
:
vm
.
idCardBack
=
imgUrl
[
0
]
vm
.
idCardIdentify
(
imgUrl
[
0
])
}
else
if
(
ocrType
===
'bankCard'
)
{
vm
.
bankImg
=
imgUrl
[
0
]
vm
.
bankCardIdentify
(
imgUrl
[
0
])
}
}
let
error
=
function
()
{
hlsPopup
.
showLongCenter
(
error
)
...
...
@@ -526,13 +538,24 @@ export default {
hlsUtil
.
baiduOcr
(
fileUrl
,
url
,
function
(
res
)
{
hlsPopup
.
hideLoading
()
let
result
=
res
.
result
.
words_result
console
.
log
(
'识别结果: '
+
result
)
console
.
log
(
'姓名: '
+
result
.
姓名
.
words
)
vm
.
baseInfo
.
bp_name
=
result
.
姓名
.
words
vm
.
baseInfo
.
id_card_no
=
result
.
公民身份号码
.
words
vm
.
baseInfo
.
address_on_resident_booklit
=
result
.
住址
.
words
})
},
// 银行卡识别
bankCardIdentify
(
fileUrl
)
{
let
vm
=
this
hlsPopup
.
showLoading
(
'正在识别'
)
let
url
=
process
.
env
.
ocrPath
+
'/baidu/ocr/bankCard'
hlsUtil
.
baiduOcr
(
fileUrl
,
url
,
function
(
res
)
{
hlsPopup
.
hideLoading
()
let
result
=
res
.
result
.
result
vm
.
bank
.
bank_account_num
=
result
.
bank_card_number
vm
.
bank
.
bank_full_name
=
result
.
bank_name
vm
.
bank
.
bank_card_type
=
result
.
bank_card_type
})
},
successCall
()
{
this
.
hideModal
()
this
.
getBankInfo
()
...
...
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