Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
U
uni-pdtravel
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
panyongping
uni-pdtravel
Commits
c74814df
Commit
c74814df
authored
Apr 22, 2024
by
潘永坪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
外国人身份证bug处理
parent
9d067769
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
34 deletions
+36
-34
editContacts.vue
pages/scenic/scenicComponents/editContacts.vue
+36
-34
No files found.
pages/scenic/scenicComponents/editContacts.vue
View file @
c74814df
...
...
@@ -26,16 +26,18 @@
<text
class=
"bottom-title"
>
证件类型
</text>
<text
style=
"flex: 1;"
v-if=
"credentialType==0"
>
身份证
</text>
<text
style=
"flex: 1;"
v-if=
"credentialType==1"
>
护照
</text>
<text
style=
"flex: 1;"
v-if=
"credentialType==2"
>
港澳通行证
</text>
<text
style=
"flex: 1;"
v-if=
"credentialType==3"
>
台胞通行证
</text>
<text
style=
"flex: 1;"
v-if=
"credentialType==4"
>
台胞证
</text>
<text
style=
"flex: 1;"
v-if=
"credentialType==5"
>
回乡证
</text>
<text
style=
"flex: 1;"
v-if=
"credentialType==6"
>
外国人永久居留证
</text>
<text
style=
"flex: 1;"
v-if=
"credentialType==7"
>
学生证
</text>
<text
style=
"flex: 1;"
v-if=
"credentialType==8"
>
军官证
</text>
<text
style=
"flex: 1;"
v-if=
"credentialType==9"
>
残疾军人证
</text>
<!-- 0和空用全等防止为空时出现bug -->
<text
style=
"flex: 1;"
v-if=
"credentialType===''"
>
请选择证件类型
</text>
<text
style=
"flex: 1;"
v-if=
"credentialType===0"
>
身份证
</text>
<text
style=
"flex: 1;"
v-if=
"credentialType=='1'"
>
护照
</text>
<text
style=
"flex: 1;"
v-if=
"credentialType=='2'"
>
港澳通行证
</text>
<text
style=
"flex: 1;"
v-if=
"credentialType=='3'"
>
台胞通行证
</text>
<text
style=
"flex: 1;"
v-if=
"credentialType=='4'"
>
台胞证
</text>
<text
style=
"flex: 1;"
v-if=
"credentialType=='5'"
>
回乡证
</text>
<text
style=
"flex: 1;"
v-if=
"credentialType=='6'"
>
外国人永久居留证
</text>
<text
style=
"flex: 1;"
v-if=
"credentialType=='7'"
>
学生证
</text>
<text
style=
"flex: 1;"
v-if=
"credentialType=='8'"
>
军官证
</text>
<text
style=
"flex: 1;"
v-if=
"credentialType=='9'"
>
残疾军人证
</text>
<u-icon
name=
"arrow-right"
size=
'26'
color=
'#B4B4B4'
></u-icon>
</view>
...
...
@@ -74,16 +76,17 @@
证件类型
</view>
<view
v-for=
"(item,index) in credentialList"
:key=
'index'
class=
"idList"
@
click=
"chooseCredential(item)"
>
<text
v-if=
"item==0"
>
身份证
</text>
<text
v-if=
"item==1"
>
护照
</text>
<text
v-if=
"item==2"
>
港澳通行证
</text>
<text
v-if=
"item==3"
>
台胞通行证
</text>
<text
v-if=
"item==4"
>
台胞证
</text>
<text
v-if=
"item==5"
>
回乡证
</text>
<text
v-if=
"item==6"
>
外国人永久居留证
</text>
<text
v-if=
"item==7"
>
学生证
</text>
<text
v-if=
"item==8"
>
军官证
</text>
<text
v-if=
"item==9"
>
残疾军人证
</text>
<!-- 0用全等防止为空时出现bug -->
<text
v-if=
"item===0"
>
身份证
</text>
<text
v-if=
"item=='1'"
>
护照
</text>
<text
v-if=
"item=='2'"
>
港澳通行证
</text>
<text
v-if=
"item=='3'"
>
台胞通行证
</text>
<text
v-if=
"item=='4'"
>
台胞证
</text>
<text
v-if=
"item=='5'"
>
回乡证
</text>
<text
v-if=
"item=='6'"
>
外国人永久居留证
</text>
<text
v-if=
"item=='7'"
>
学生证
</text>
<text
v-if=
"item=='8'"
>
军官证
</text>
<text
v-if=
"item=='9'"
>
残疾军人证
</text>
<u-icon
name=
'checkmark'
size=
'48'
color=
'#3688FF'
v-if=
"credentialType==item"
></u-icon>
</view>
</view>
...
...
@@ -104,28 +107,29 @@ export default {
reviseContactId
:
''
,
//被修改人id
showIdType
:
false
,
//证件类型弹窗显示隐藏
credentialList
:[],
//证件类型列表
credentialType
:
0
,
//选中的证件类型,默认身份证
credentialType
:
''
,
//选中的证件类型
placeholderText
:
''
,
//提示输入什么证件
}
},
watch
:
{
editContactData
:
{
editContactData
:
{
//编辑联系人数据
handler
(
newValue
,
oldValue
)
{
this
.
name
=
newValue
.
name
||
''
this
.
credentialNumber
=
newValue
.
credentialNumber
||
''
this
.
reviseContactId
=
newValue
.
id
||
''
this
.
phone
=
newValue
.
phone
||
''
this
.
credentialType
=
newValue
.
credentialType
||
0
this
.
credentialType
=
newValue
.
credentialType
||
''
},
deep
:
true
,
immediate
:
true
},
credential
:
{
credential
:
{
//该产品对应联系人可以添加的证件类型
handler
(
newValue
,
oldValue
)
{
if
(
newValue
){
this
.
credentialList
=
newValue
.
split
(
','
)
if
(
this
.
credentialList
.
length
==
1
){
let
type
=
this
.
credentialList
[
0
]
this
.
credentialType
=
type
if
(
type
==
'0'
){
this
.
placeholderText
=
'请输入身份证,必填'
}
if
(
type
==
'1'
){
this
.
placeholderText
=
'请输入护照,必填'
}
if
(
type
==
'2'
){
this
.
placeholderText
=
'请输入港澳通行证,必填'
}
...
...
@@ -158,6 +162,13 @@ export default {
})
return
}
if
(
this
.
credentialType
===
''
){
uni
.
showToast
({
title
:
'请选择证件类型'
,
icon
:
'none'
})
return
}
if
(
!
this
.
credentialNumber
){
uni
.
showToast
({
title
:
'请输入证件号码'
,
...
...
@@ -172,15 +183,6 @@ export default {
})
return
}
let
credentialType
=
''
//当只有一个证件类型时取第一个
if
(
this
.
credentialList
.
length
==
1
){
credentialType
=
this
.
credentialList
[
0
]
}
//当有多个证件类型时取选中的那一个
if
(
this
.
credentialList
.
length
>
1
){
credentialType
=
this
.
credentialType
}
let
data
=
{
name
:
this
.
name
,
//保存姓名
phone
:
this
.
phone
,
//电话号码
...
...
@@ -189,7 +191,7 @@ export default {
merchantType
:
1
,
//商户类型,1.景区,2.酒店,3.餐饮
id
:
this
.
reviseContactId
,
//被修改人id
category
:
''
,
//成人或者儿童
credentialType
,
//证件类型
credentialType
:
this
.
credentialType
,
//证件类型
}
let
queryUrl
=
''
if
(
this
.
reviseContactId
){
...
...
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