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
94676e95
Commit
94676e95
authored
Oct 31, 2019
by
李晓兵
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
'身份证修改'
parent
41e5d6a4
Changes
2
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
172 additions
and
88 deletions
+172
-88
naturePerson.vue
src/pages/userBind/np/naturePerson.vue
+62
-66
enterprise.vue
src/pages/userBind/org/enterprise.vue
+110
-22
No files found.
src/pages/userBind/np/naturePerson.vue
View file @
94676e95
...
@@ -100,38 +100,38 @@
...
@@ -100,38 +100,38 @@
>
>
</item>
</item>
<item>
<item>
<div
slot=
"name"
class=
"required"
>
身份证有效期从
</div>
<div
slot=
"name"
class=
"required"
>
户籍地址
</div>
<
input
<
textarea
slot=
"content"
slot=
"content"
v-model=
"baseInfo.id_card_date_from"
ref=
"myTestarea"
v-model=
"baseInfo.address_on_resident_booklit"
readonly
readonly
cols=
"30"
rows=
"1"
placeholder=
"上传身份证自动填充"
placeholder=
"上传身份证自动填充"
class=
"auto"
class=
"auto"
>
@
input=
"addRows(baseInfo.address_on_resident_booklit)"
/>
</item>
</item>
<item>
<item>
<div
slot=
"name"
class=
"required"
>
身份证有效期
到
</div>
<div
slot=
"name"
class=
"required"
>
身份证有效期
从
</div>
<input
<input
slot=
"content"
slot=
"content"
v-model=
"baseInfo.id_card_date_
to
"
v-model=
"baseInfo.id_card_date_
from
"
readonly
readonly
placeholder=
"上传身份证自动填充"
placeholder=
"上传身份证自动填充"
class=
"auto"
class=
"auto"
>
>
</item>
</item>
<item>
<item>
<div
slot=
"name"
class=
"required"
>
户籍地址
</div>
<div
slot=
"name"
class=
"required"
>
身份证有效期到
</div>
<
textarea
<
input
slot=
"content"
slot=
"content"
ref=
"myTestarea"
v-model=
"baseInfo.id_card_date_to"
v-model=
"baseInfo.address_on_resident_booklit"
readonly
readonly
cols=
"30"
rows=
"1"
placeholder=
"上传身份证自动填充"
placeholder=
"上传身份证自动填充"
class=
"auto"
class=
"auto"
@
input=
"addRows(baseInfo.address_on_resident_booklit)"
>
/>
</item>
</item>
<item>
<item>
<div
slot=
"name"
class=
"required"
>
手机号码
</div>
<div
slot=
"name"
class=
"required"
>
手机号码
</div>
...
@@ -597,16 +597,16 @@ export default {
...
@@ -597,16 +597,16 @@ export default {
})
})
switch
(
cdd_item
)
{
switch
(
cdd_item
)
{
case
'NP_ID_CARD_F'
:
// 承租人身份证正面
case
'NP_ID_CARD_F'
:
// 承租人身份证正面
vm
.
idCardFront
=
item
.
url
vm
.
idCardFront
=
res
.
lists
[
0
]
.
url
break
break
case
'NP_ID_CARD_B'
:
// 承租人身份证背面
case
'NP_ID_CARD_B'
:
// 承租人身份证背面
vm
.
idCardBack
=
item
.
url
vm
.
idCardBack
=
res
.
lists
[
0
]
.
url
break
break
case
'MATE_ID_CARD_F'
:
// 配偶身份证正面
case
'MATE_ID_CARD_F'
:
// 配偶身份证正面
vm
.
idCardFrontSp
=
item
.
url
vm
.
idCardFrontSp
=
res
.
lists
[
0
]
.
url
break
break
case
'MATE_ID_CARD_B'
:
// 配偶身份证背面
case
'MATE_ID_CARD_B'
:
// 配偶身份证背面
vm
.
idCardBackSp
=
item
.
url
vm
.
idCardBackSp
=
res
.
lists
[
0
]
.
url
break
break
default
:
default
:
vm
.
dowload_list
.
push
(
res
.
lists
)
vm
.
dowload_list
.
push
(
res
.
lists
)
...
@@ -999,11 +999,9 @@ export default {
...
@@ -999,11 +999,9 @@ export default {
hlsPopup
.
showLongCenter
(
'请拍照'
)
hlsPopup
.
showLongCenter
(
'请拍照'
)
}
else
{
}
else
{
if
(
ocrType
===
'idCard'
)
{
if
(
ocrType
===
'idCard'
)
{
// vm.idCardEditFlag = true // 身份证图片状态已修改
type
===
'front'
?
(
vm
.
idCardFront
=
imgdata
,
vm
.
idCardIdentify
(
imgdata
,
'idCard'
),
vm
.
idCardFrontEditFlag
=
true
)
:
(
vm
.
idCardBack
=
imgdata
,
vm
.
idCardBackIdentify
(
imgdata
,
'idCard'
),
vm
.
idCardBackEditFlag
=
true
)
type
===
'front'
?
(
vm
.
idCardFront
=
imgdata
,
vm
.
idCardIdentify
(
imgdata
,
'idCard'
),
vm
.
idCardFrontEditFlag
=
true
)
:
(
vm
.
idCardBack
=
imgdata
,
vm
.
idCardBackIdentify
(
imgdata
,
'idCard'
),
vm
.
idCardBackEditFlag
=
true
)
}
else
if
(
ocrType
===
'idCardSp'
)
{
// 配偶身份证识别
}
else
if
(
ocrType
===
'idCardSp'
)
{
// 配偶身份证识别
vm
.
idCardSpEditFlag
=
true
// 身份证图片状态已修改
type
===
'front'
?
(
vm
.
idCardFrontSp
=
imgdata
,
vm
.
idCardIdentify
(
imgdata
,
'idCardSp'
),
vm
.
idCardFrontSpEditFlag
=
true
)
:
(
vm
.
idCardBackSp
=
imgdata
,
vm
.
idCardBackIdentify
(
imgdata
,
'idCardSp'
),
vm
.
idCardBackSpEditFlag
=
true
)
type
===
'front'
?
(
vm
.
idCardFrontSp
=
imgdata
,
vm
.
idCardIdentify
(
imgdata
,
'idCardSp'
),
vm
.
idCardFrontSpEditFlag
=
true
)
:
(
vm
.
idCardBackSp
=
imgdata
,
vm
.
idCardBackIdentify
(
imgdata
,
'idCardSp'
),
vm
.
idCardBackSpEditFlag
=
true
)
}
else
if
(
ocrType
===
'bankCard'
)
{
}
else
if
(
ocrType
===
'bankCard'
)
{
vm
.
bankImg
=
imgdata
vm
.
bankImg
=
imgdata
vm
.
bankCardIdentify
(
imgdata
)
vm
.
bankCardIdentify
(
imgdata
)
...
@@ -1028,11 +1026,9 @@ export default {
...
@@ -1028,11 +1026,9 @@ export default {
hlsPopup
.
showLongCenter
(
'请选择一张图片'
)
hlsPopup
.
showLongCenter
(
'请选择一张图片'
)
}
else
{
}
else
{
if
(
ocrType
===
'idCard'
)
{
if
(
ocrType
===
'idCard'
)
{
vm
.
idCardEditFlag
=
true
// 身份证图片状态已修改
type
===
'front'
?
(
vm
.
idCardFront
=
imgUrl
[
0
],
vm
.
idCardIdentify
(
imgUrl
[
0
],
'idCard'
),
vm
.
idCardFrontEditFlag
=
true
)
:
(
vm
.
idCardBack
=
imgUrl
[
0
],
vm
.
idCardBackIdentify
(
imgUrl
[
0
],
'idCard'
),
vm
.
idCardBackEditFlag
=
true
)
type
===
'front'
?
(
vm
.
idCardFront
=
imgUrl
[
0
],
vm
.
idCardIdentify
(
imgUrl
[
0
],
'idCard'
),
vm
.
idCardFrontEditFlag
=
true
)
:
(
vm
.
idCardBack
=
imgUrl
[
0
],
vm
.
idCardBackIdentify
(
imgUrl
[
0
],
'idCard'
),
vm
.
idCardBackEditFlag
=
true
)
}
else
if
(
ocrType
===
'idCardSp'
)
{
// 配偶身份证识别
}
else
if
(
ocrType
===
'idCardSp'
)
{
// 配偶身份证识别
type
===
'front'
?
(
vm
.
idCardFrontSp
=
imgUrl
[
0
],
vm
.
idCardIdentify
(
imgUrl
[
0
],
'idCardSp'
),
vm
.
idCardFrontSpEditFlag
=
true
)
:
(
vm
.
idCardBackSp
=
imgUrl
[
0
],
vm
.
idCardBackIdentify
(
imgUrl
[
0
],
'idCardSp'
),
vm
.
idCardBackSpEditFlag
=
true
)
vm
.
idCardSpEditFlag
=
true
// 身份证图片状态已修改
type
===
'front'
?
(
vm
.
idCardFrontSp
=
imgUrl
[
0
],
vm
.
idCardIdentify
(
imgUrl
[
0
],
'idCardSp'
),
vm
.
idCardFrontSpEditFlag
=
true
)
:
(
vm
.
idCardBackSp
=
imgUrl
[
0
],
vm
.
idCardBackIdentify
(
imgUrl
[
0
],
'idCardSp'
),
vm
.
idCardBackSpEditFlag
=
true
)
}
else
if
(
ocrType
===
'bankCard'
)
{
}
else
if
(
ocrType
===
'bankCard'
)
{
vm
.
bankImg
=
imgUrl
[
0
]
vm
.
bankImg
=
imgUrl
[
0
]
vm
.
bankCardIdentify
(
imgUrl
[
0
])
vm
.
bankCardIdentify
(
imgUrl
[
0
])
...
@@ -1045,40 +1041,40 @@ export default {
...
@@ -1045,40 +1041,40 @@ export default {
vm
.
hlsUtil
.
takePicture
(
cameraoptions
,
success
,
error
)
vm
.
hlsUtil
.
takePicture
(
cameraoptions
,
success
,
error
)
},
},
// 身份证识别
// 身份证识别
idCardIdentify
(
fileUrl
,
cardType
)
{
idCardIdentify
(
fileUrl
,
cardType
)
{
let
vm
=
this
let
vm
=
this
hlsPopup
.
showLoading
(
'正在识别'
)
hlsPopup
.
showLoading
(
'正在识别'
)
let
url
=
process
.
env
.
ocrPath
+
'/baidu/ocr/idCard'
let
url
=
process
.
env
.
ocrPath
+
'/baidu/ocr/idCard'
hlsUtil
.
baiduOcr
(
fileUrl
,
url
,
function
(
res
)
{
hlsUtil
.
baiduOcr
(
fileUrl
,
url
,
function
(
res
)
{
hlsPopup
.
hideLoading
()
hlsPopup
.
hideLoading
()
let
result
=
res
.
result
.
words_result
let
result
=
res
.
result
.
words_result
if
(
cardType
===
'idCard'
)
{
if
(
cardType
===
'idCard'
)
{
vm
.
baseInfo
.
bp_name
=
result
.
姓名
.
words
vm
.
baseInfo
.
bp_name
=
result
.
姓名
.
words
vm
.
baseInfo
.
id_card_no
=
result
.
公民身份号码
.
words
vm
.
baseInfo
.
id_card_no
=
result
.
公民身份号码
.
words
vm
.
baseInfo
.
address_on_resident_booklit
=
result
.
住址
.
words
vm
.
baseInfo
.
address_on_resident_booklit
=
result
.
住址
.
words
}
else
{
}
else
{
vm
.
baseInfo
.
bp_name_sp
=
result
.
姓名
.
words
vm
.
baseInfo
.
bp_name_sp
=
result
.
姓名
.
words
vm
.
baseInfo
.
id_card_no_sp
=
result
.
公民身份号码
.
words
vm
.
baseInfo
.
id_card_no_sp
=
result
.
公民身份号码
.
words
}
}
})
})
},
},
// 身份证背面识别
// 身份证背面识别
idCardBackIdentify
(
fileUrl
,
cardType
)
{
idCardBackIdentify
(
fileUrl
,
cardType
)
{
let
vm
=
this
let
vm
=
this
hlsPopup
.
showLoading
(
'正在识别'
)
hlsPopup
.
showLoading
(
'正在识别'
)
let
url
=
process
.
env
.
ocrPath
+
'/baidu/ocr/idCardBack'
let
url
=
process
.
env
.
ocrPath
+
'/baidu/ocr/idCardBack'
hlsUtil
.
baiduOcr
(
fileUrl
,
url
,
function
(
res
)
{
hlsUtil
.
baiduOcr
(
fileUrl
,
url
,
function
(
res
)
{
hlsPopup
.
hideLoading
()
hlsPopup
.
hideLoading
()
let
result
=
res
.
result
.
words_result
let
result
=
res
.
result
.
words_result
if
(
cardType
===
'idCard'
)
{
if
(
cardType
===
'idCard'
)
{
vm
.
baseInfo
.
id_card_date_from
=
result
.
签发日期
.
words
vm
.
baseInfo
.
id_card_date_from
=
result
.
签发日期
.
words
vm
.
baseInfo
.
id_card_date_to
=
result
.
失效日期
.
words
vm
.
baseInfo
.
id_card_date_to
=
result
.
失效日期
.
words
}
else
{
}
else
{
vm
.
baseInfo
.
id_card_date_from_sp
=
result
.
签发日期
.
words
vm
.
baseInfo
.
id_card_date_from_sp
=
result
.
签发日期
.
words
vm
.
baseInfo
.
id_card_date_to_sp
=
result
.
失效日期
.
words
vm
.
baseInfo
.
id_card_date_to_sp
=
result
.
失效日期
.
words
}
}
})
})
},
},
// 银行卡识别
// 银行卡识别
bankCardIdentify
(
fileUrl
)
{
bankCardIdentify
(
fileUrl
)
{
let
vm
=
this
let
vm
=
this
...
...
src/pages/userBind/org/enterprise.vue
View file @
94676e95
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