Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
杨炀
/
ztx_wx_gzt
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
67a6778f
authored
2026-06-09 15:04:42 +0800
by
lttnew
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
认证
1 parent
ab789555
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
82 additions
and
40 deletions
myCenter/perfect.vue
pages/index/perfect.vue
personalVip/renew.vue
myCenter/perfect.vue
View file @
67a6778
...
...
@@ -11,7 +11,7 @@
<view
v-else
class=
"license-preview"
>
<image
:src=
"getImageUrl(getBusinessLicenseUrl())"
class=
"license-img"
@
click=
"previewImage(getImageUrl(getBusinessLicenseUrl()))"
></image>
<view
v-if=
"!isFieldDisabled('businessLicense')"
class=
"delete-btn"
@
click
.
stop=
"delSupplementFile"
>
×
</view>
<view
class=
"delete-btn"
@
click
.
stop=
"delSupplementFile"
>
×
</view>
</view>
</view>
</uni-forms-item>
...
...
@@ -48,7 +48,7 @@
<view
v-else
class=
"idcard-preview"
>
<image
:src=
"getImageUrl(legalIdcPhoto1)"
class=
"idcard-img"
@
click=
"previewImage(getImageUrl(legalIdcPhoto1))"
></image>
<view
v-if=
"!isFieldDisabled('legalIdcPhoto1')"
class=
"delete-btn"
@
click
.
stop=
"delimgFont"
>
×
</view>
<view
class=
"delete-btn"
@
click
.
stop=
"delimgFont"
>
×
</view>
</view>
</view>
</view>
...
...
@@ -60,7 +60,7 @@
<view
v-else
class=
"idcard-preview"
>
<image
:src=
"getImageUrl(legalIdcPhoto2)"
class=
"idcard-img"
@
click=
"previewImage(getImageUrl(legalIdcPhoto2))"
></image>
<view
v-if=
"!isFieldDisabled('legalIdcPhoto2')"
class=
"delete-btn"
@
click
.
stop=
"delimgBack"
>
×
</view>
<view
class=
"delete-btn"
@
click
.
stop=
"delimgBack"
>
×
</view>
</view>
</view>
</view>
...
...
@@ -72,10 +72,10 @@
<uni-easyinput
v-model=
"form.legalIdcCode"
:disabled=
"isFieldDisabled('legalIdcCode')"
/>
</uni-forms-item>
<uni-forms-item
label=
"联系人"
required
>
<uni-easyinput
v-model=
"form.siteContact"
:disabled=
"
isFieldDisabled('siteContact')
"
/>
<uni-easyinput
v-model=
"form.siteContact"
:disabled=
"
false
"
/>
</uni-forms-item>
<uni-forms-item
label=
"联系方式"
required
>
<uni-easyinput
v-model=
"form.siteTel"
:disabled=
"
isFieldDisabled('siteTel')
"
/>
<uni-easyinput
v-model=
"form.siteTel"
:disabled=
"
false
"
/>
</uni-forms-item>
<uni-forms-item
label=
"上传机构照片"
required
>
<view
class=
"pictures-box"
>
...
...
@@ -85,7 +85,7 @@
<view
v-else
class=
"pictures-preview"
>
<image
:src=
"getImageUrl(picArr[0])"
class=
"picture-img"
@
click=
"previewImage(picArr.map(item => getImageUrl(item)))"
></image>
<view
v-if=
"!isFieldDisabled('pictures')"
class=
"delete-btn"
@
click
.
stop=
"delpicArr"
>
×
</view>
<view
class=
"delete-btn"
@
click
.
stop=
"delpicArr"
>
×
</view>
</view>
</view>
</uni-forms-item>
...
...
@@ -251,25 +251,28 @@
const
coordinates1
=
ref
([])
const
pictures
=
ref
()
const
legalIdcPhoto
=
ref
([])
const
carriedReadonlyFields
=
[
'companyName'
,
'creditCode'
,
'name'
,
'address'
,
'adress'
,
'parentId'
,
'legal'
,
'legalIdcCode'
]
function
isFieldDisabled
(
field
)
{
const
disabledMap
=
{
businessLicense
:
false
,
companyName
:
false
,
creditCode
:
false
,
name
:
type
.
value
,
address
:
false
,
adress
:
false
,
parentId
:
type
.
value
,
legalIdcPhoto1
:
false
,
legalIdcPhoto2
:
false
,
legal
:
false
,
legalIdcCode
:
false
,
siteContact
:
false
,
siteTel
:
false
,
pictures
:
false
}
return
!!
disabledMap
[
field
]
if
([
'businessLicense'
,
'legalIdcPhoto1'
,
'legalIdcPhoto2'
,
'pictures'
,
'siteContact'
,
'siteTel'
].
includes
(
field
))
{
return
false
}
return
!!
ocrLockedFields
.
value
[
field
]
||
isCarriedFieldLocked
(
field
)
}
function
isCarriedFieldLocked
(
field
)
{
if
(
!
carriedReadonlyFields
.
includes
(
field
))
return
false
if
(
field
===
'address'
)
{
return
!!
(
form
.
value
.
provinceId
||
form
.
value
.
cityId
||
form
.
value
.
regionId
||
coordinates1
.
value
?.
length
)
}
if
(
field
===
'name'
)
{
return
hasValue
(
form
.
value
.
name
||
form
.
value
.
baseName
)
}
return
hasValue
(
form
.
value
[
field
])
}
function
hasValue
(
value
)
{
return
value
!==
undefined
&&
value
!==
null
&&
String
(
value
).
trim
()
!==
''
}
function
lockOcrField
(
field
,
value
)
{
...
...
@@ -968,7 +971,6 @@
}
function
chooseIdCardFront
()
{
if
(
isFieldDisabled
(
'legalIdcPhoto1'
))
return
uni
.
chooseImage
({
count
:
1
,
sizeType
:
[
'compressed'
],
...
...
@@ -978,7 +980,6 @@
}
function
chooseIdCardBack
()
{
if
(
isFieldDisabled
(
'legalIdcPhoto2'
))
return
uni
.
chooseImage
({
count
:
1
,
sizeType
:
[
'compressed'
],
...
...
@@ -988,7 +989,6 @@
}
function
upIdCardImgFront
(
e
)
{
if
(
isFieldDisabled
(
'legalIdcPhoto1'
))
return
const
tempFilePaths
=
e
.
tempFilePaths
;
const
imgUrl
=
tempFilePaths
[
0
]
if
(
!
imgUrl
)
return
...
...
@@ -1008,7 +1008,6 @@
}
function
upIdCardImgBack
(
e
)
{
if
(
isFieldDisabled
(
'legalIdcPhoto2'
))
return
const
tempFilePaths
=
e
.
tempFilePaths
;
const
imgUrl
=
tempFilePaths
[
0
]
if
(
!
imgUrl
)
return
...
...
@@ -1029,13 +1028,11 @@
}
function
delimgFont
()
{
if
(
isFieldDisabled
(
'legalIdcPhoto1'
))
return
legalIdcPhoto1
.
value
=
''
form
.
value
.
legalIdcPhoto
=
[
legalIdcPhoto1
.
value
,
legalIdcPhoto2
.
value
].
filter
(
Boolean
).
join
(
','
)
}
function
delimgBack
()
{
if
(
isFieldDisabled
(
'legalIdcPhoto2'
))
return
legalIdcPhoto2
.
value
=
''
form
.
value
.
legalIdcPhoto
=
[
legalIdcPhoto1
.
value
,
legalIdcPhoto2
.
value
].
filter
(
Boolean
).
join
(
','
)
}
...
...
@@ -1067,7 +1064,6 @@
let
selectFileValue
=
{}
function
chooseBusinessLicense
()
{
if
(
isFieldDisabled
(
'businessLicense'
))
return
uni
.
chooseImage
({
count
:
1
,
sizeType
:
[
'compressed'
],
...
...
@@ -1089,9 +1085,9 @@
}
async
function
selectFile
(
e
)
{
if
(
isFieldDisabled
(
'businessLicense'
))
return
let
file
=
e
.
tempFiles
[
0
]
if
(
!
file
)
return
unlockOcrFields
()
const
filePath
=
file
.
url
||
file
.
path
||
e
.
tempFilePaths
?.[
0
]
uni
.
showLoading
({
title
:
'上传中'
...
...
@@ -1126,7 +1122,6 @@
}
function
delSupplementFile
()
{
if
(
isFieldDisabled
(
'businessLicense'
))
return
selectFileValue
=
{}
form
.
value
.
businessLicense
=
''
unlockOcrFields
()
...
...
@@ -1180,7 +1175,6 @@
}
function
choosePictures
()
{
if
(
isFieldDisabled
(
'pictures'
))
return
uni
.
chooseImage
({
count
:
3
,
sizeType
:
[
'compressed'
],
...
...
@@ -1190,7 +1184,6 @@
}
function
upPicArr
(
e
)
{
if
(
isFieldDisabled
(
'pictures'
))
return
const
tempFilePaths
=
e
.
tempFilePaths
;
const
imgUrl
=
tempFilePaths
[
0
]
if
(
!
imgUrl
)
return
...
...
@@ -1211,7 +1204,6 @@
}
function
delpicArr
()
{
if
(
isFieldDisabled
(
'pictures'
))
return
picArr
.
value
=
[]
form
.
value
.
pictures
=
''
}
...
...
@@ -1419,14 +1411,34 @@
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
font-size
:
34
rpx
;
font-weight
:
bold
;
line-height
:
44
rpx
;
font-size
:
0
;
line-height
:
1
;
z-index
:
99
;
border
:
4
rpx
solid
#fff
;
box-shadow
:
0
4
rpx
14
rpx
rgba
(
173
,
24
,
31
,
0.35
);
}
.delete-btn
::before
,
.delete-btn
::after
{
content
:
''
;
position
:
absolute
;
left
:
50%
;
top
:
50%
;
width
:
24
rpx
;
height
:
4
rpx
;
background
:
#fff
;
border-radius
:
4
rpx
;
transform-origin
:
center
;
}
.delete-btn
::before
{
transform
:
translate
(
-50%
,
-50%
)
rotate
(
45deg
);
}
.delete-btn
::after
{
transform
:
translate
(
-50%
,
-50%
)
rotate
(
-45deg
);
}
.btn-red
{
background
:
linear-gradient
(
135deg
,
#AD181F
0%
,
#c42a2a
100%
);
color
:
#fff
;
...
...
pages/index/perfect.vue
View file @
67a6778
...
...
@@ -1943,12 +1943,33 @@ watch(activeStep, (newVal) => {
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
font-size
:
28
rpx
;
font-weight
:
bold
;
font-size
:
0
;
line-height
:
1
;
z-index
:
10
;
box-shadow
:
0
2
rpx
8
rpx
rgba
(
0
,
0
,
0
,
0.2
);
}
.delete-btn
::before
,
.delete-btn
::after
{
content
:
''
;
position
:
absolute
;
left
:
50%
;
top
:
50%
;
width
:
22
rpx
;
height
:
4
rpx
;
background
:
#fff
;
border-radius
:
4
rpx
;
transform-origin
:
center
;
}
.delete-btn
::before
{
transform
:
translate
(
-50%
,
-50%
)
rotate
(
45deg
);
}
.delete-btn
::after
{
transform
:
translate
(
-50%
,
-50%
)
rotate
(
-45deg
);
}
.pictures-box
{
width
:
100%
;
}
...
...
personalVip/renew.vue
View file @
67a6778
...
...
@@ -258,10 +258,15 @@
// 确认添加
async
function
confirmAdd
()
{
addForm
.
value
.
idcCode
=
String
(
addForm
.
value
.
idcCode
||
''
).
trim
().
toUpperCase
()
if
(
!
addForm
.
value
.
idcCode
)
{
uni
.
showToast
({
title
:
'请输入证件号'
,
icon
:
'none'
})
return
}
if
(
addForm
.
value
.
idType
===
'0'
&&
!
isValidIdCard
(
addForm
.
value
.
idcCode
))
{
uni
.
showToast
({
title
:
'请输入正确的身份证号码'
,
icon
:
'none'
})
return
}
if
(
!
queryParams
.
value
.
rangeId
)
{
uni
.
showToast
({
title
:
'缺少rangeId'
,
icon
:
'none'
})
return
...
...
@@ -281,6 +286,10 @@
console
.
error
(
e
)
}
}
function
isValidIdCard
(
idcCode
)
{
return
/
(
^
\d{15}
$
)
|
(
^
\d{17}([
0-9
]
|X
)
$
)
/
.
test
(
idcCode
)
}
</
script
>
<
style
scoped
lang=
"scss"
>
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
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 post a comment