Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
usedCarAuction
/
aus
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit ac977ba8
authored
Aug 19, 2026
by
zhangxw
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
个人认证上传图片bug修复
1 parent
c5c2fbb8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
22 deletions
aus-front/app/src/module/account/CertificationResult.vue
aus-front/app/src/module/account/PersonCertificationPage.vue
aus-front/app/src/module/account/CertificationResult.vue
View file @
ac977ba
...
@@ -87,23 +87,22 @@
...
@@ -87,23 +87,22 @@
<view
class=
"section-desc"
>
请上传本人的身份证照片,证件信息仅用于身份认证
</view>
<view
class=
"section-desc"
>
请上传本人的身份证照片,证件信息仅用于身份认证
</view>
<view
class=
"upload-section"
>
<view
class=
"upload-section"
>
<view
class=
"upload-item"
>
<view
class=
"upload-item"
>
<uni-file-picker
fileMediatype=
"image"
:image-styles=
"imageStyles"
@
select=
"selectFile($event,'front')"
mode=
"grid"
:auto-upload=
"true"
<uni-file-picker
fileMediatype=
"image"
:image-styles=
"imageStyles"
@
select=
"selectFile($event,'front')"
@
delete=
"deleteFile('front')"
mode=
"grid"
:auto-upload=
"true"
:limit=
"1"
file-extname=
"png,jpg,jpeg"
>
:limit=
"1"
file-extname=
"png,jpg,jpeg"
>
<view
class=
"upload-placeholder"
>
<view
class=
"upload-placeholder"
>
<image
v-if=
"formData.idCardPortrait?.url || account?.idCardPortraitUrl"
:src=
"formData.idCardPortrait?.url || account?.idCardPortraitUrl"
mode=
"aspectFill"
style=
"width: 100%; height: 150px;"
></image>
<image
src=
"~@/static/images/account/certifition/idcard_0@2x.png"
style=
"width: 100%; height: 150px;"
></image>
<image
v-else
src=
"~@/static/images/account/certifition/idcard_0@2x.png"
style=
"width: 100%; height: 150px;"
></image>
<text
class=
"upload-text"
>
上传人像面
</text>
<text
class=
"upload-text"
>
上传人像面
</text>
</view>
</view>
</uni-file-picker>
</uni-file-picker>
</view>
</view>
<view
class=
"upload-item"
>
<view
class=
"upload-item"
>
<uni-file-picker
fileMediatype=
"image"
:image-styles=
"imageStyles"
@
select=
"selectFile($event,'back')"
:limit=
"1"
file-extname=
"png,jpg,jpeg"
>
<uni-file-picker
fileMediatype=
"image"
:image-styles=
"imageStyles"
@
select=
"selectFile($event,'back')"
@
delete=
"deleteFile('back')"
:limit=
"1"
file-extname=
"png,jpg,jpeg"
>
<view
class=
"upload-placeholder"
>
<view
class=
"upload-placeholder"
>
<image
v-if=
"formData.idCardNationalEmblem?.url || account?.idCardNationalEmblemUrl"
:src=
"formData.idCardNationalEmblem?.url || account?.idCardNationalEmblemUrl"
mode=
"aspectFill"
style=
"width: 100%; height: 150px;"
></image>
<image
class=
"add-img"
src=
"~@/static/images/account/certifition/idcard_1@2x.png"
style=
"width: 100%; height: 150px;"
></image>
<image
v-else
src=
"~@/static/images/account/certifition/idcard_1@2x.png"
style=
"width: 100%; height: 150px;"
></image>
<text
class=
"upload-text"
>
上传国徽面
</text>
<text
class=
"upload-text"
>
上传国徽面
</text>
</view>
</view>
</uni-file-picker>
</uni-file-picker>
</view>
</view>
</view>
</view>
</view>
</view>
...
@@ -193,7 +192,6 @@ export default class CertificationResult extends Vue {
...
@@ -193,7 +192,6 @@ export default class CertificationResult extends Vue {
this
.
loadAgreement
();
this
.
loadAgreement
();
});
});
onShow
(()
=>
{
onShow
(()
=>
{
this
.
loadAccount
();
});
});
}
}
...
@@ -295,6 +293,14 @@ export default class CertificationResult extends Vue {
...
@@ -295,6 +293,14 @@ export default class CertificationResult extends Vue {
}
}
}
}
deleteFile
(
e
)
{
if
(
e
==
'front'
)
{
this
.
formData
.
idCardPortrait
=
null
}
else
{
this
.
formData
.
idCardNationalEmblem
=
null
}
}
uploadFiles
(
tempFile
:
any
):
Promise
<
FileInfo
>
{
uploadFiles
(
tempFile
:
any
):
Promise
<
FileInfo
>
{
const
authService
:
AuthService
=
this
.
$auth
;
const
authService
:
AuthService
=
this
.
$auth
;
const
action
=
'upload/uploadImage?directory=account/certification'
;
const
action
=
'upload/uploadImage?directory=account/certification'
;
...
@@ -323,15 +329,15 @@ export default class CertificationResult extends Vue {
...
@@ -323,15 +329,15 @@ export default class CertificationResult extends Vue {
submitForm
()
{
submitForm
()
{
if
(
this
.
account
?.
accountType
==
"COMMON"
)
{
if
(
this
.
account
?.
accountType
==
"COMMON"
)
{
if
(
!
this
.
formData
.
idCardPortrait
||
!
this
.
formData
.
idCardPortrait
.
url
)
{
uni
.
showToast
({
title
:
'请上传身份证人像面'
,
icon
:
'none'
});
return
;
}
if
(
!
this
.
formData
.
idCardNationalEmblem
||
!
this
.
formData
.
idCardNationalEmblem
.
url
)
{
uni
.
showToast
({
title
:
'请上传身份证国徽面'
,
icon
:
'none'
});
return
;
}
this
.
$refs
.
form
.
validate
().
then
(()
=>
{
this
.
$refs
.
form
.
validate
().
then
(()
=>
{
if
(
!
this
.
formData
.
idCardPortrait
)
{
uni
.
showToast
({
title
:
'请上传身份证人像面'
,
icon
:
'none'
});
return
;
}
if
(
!
this
.
formData
.
idCardNationalEmblem
)
{
uni
.
showToast
({
title
:
'请上传身份证国徽面'
,
icon
:
'none'
});
return
;
}
uni
.
showLoading
({
title
:
'提交中...'
,
mask
:
true
});
uni
.
showLoading
({
title
:
'提交中...'
,
mask
:
true
});
AccountController
.
certifyAccount
(
this
.
axios
,
this
.
formData
).
then
(()
=>
{
AccountController
.
certifyAccount
(
this
.
axios
,
this
.
formData
).
then
(()
=>
{
uni
.
showToast
({
title
:
'提交成功'
,
icon
:
'success'
});
uni
.
showToast
({
title
:
'提交成功'
,
icon
:
'success'
});
...
...
aus-front/app/src/module/account/PersonCertificationPage.vue
View file @
ac977ba
...
@@ -34,7 +34,7 @@
...
@@ -34,7 +34,7 @@
<view
class=
"upload-section"
>
<view
class=
"upload-section"
>
<view
class=
"upload-item"
>
<view
class=
"upload-item"
>
<uni-file-picker
fileMediatype=
"image"
:image-styles=
"imageStyles"
@
select=
"selectFile($event,'front')"
mode=
"grid"
:auto-upload=
"true"
<uni-file-picker
fileMediatype=
"image"
:image-styles=
"imageStyles"
@
select=
"selectFile($event,'front')"
@
delete=
"deleteFile('front')"
mode=
"grid"
:auto-upload=
"true"
:limit=
"1"
file-extname=
"png,jpg,jpeg"
>
:limit=
"1"
file-extname=
"png,jpg,jpeg"
>
<view
class=
"upload-placeholder"
>
<view
class=
"upload-placeholder"
>
<image
src=
"~@/static/images/account/certifition/idcard_0@2x.png"
style=
"width: 100%; height: 150px;"
></image>
<image
src=
"~@/static/images/account/certifition/idcard_0@2x.png"
style=
"width: 100%; height: 150px;"
></image>
...
@@ -43,7 +43,7 @@
...
@@ -43,7 +43,7 @@
</uni-file-picker>
</uni-file-picker>
</view>
</view>
<view
class=
"upload-item"
>
<view
class=
"upload-item"
>
<uni-file-picker
fileMediatype=
"image"
:image-styles=
"imageStyles"
@
select=
"selectFile($event,'back')"
:limit=
"1"
file-extname=
"png,jpg,jpeg"
>
<uni-file-picker
fileMediatype=
"image"
:image-styles=
"imageStyles"
@
select=
"selectFile($event,'back')"
@
delete=
"deleteFile('back')"
:limit=
"1"
file-extname=
"png,jpg,jpeg"
>
<view
class=
"upload-placeholder"
>
<view
class=
"upload-placeholder"
>
<image
class=
"add-img"
src=
"~@/static/images/account/certifition/idcard_1@2x.png"
style=
"width: 100%; height: 150px;"
></image>
<image
class=
"add-img"
src=
"~@/static/images/account/certifition/idcard_1@2x.png"
style=
"width: 100%; height: 150px;"
></image>
<text
class=
"upload-text"
>
上传国徽面
</text>
<text
class=
"upload-text"
>
上传国徽面
</text>
...
@@ -179,6 +179,14 @@ export default class PersonCertificationPage extends Vue {
...
@@ -179,6 +179,14 @@ export default class PersonCertificationPage extends Vue {
}
}
}
}
deleteFile
(
e
)
{
if
(
e
==
'front'
)
{
this
.
formData
.
idCardPortrait
=
null
}
else
{
this
.
formData
.
idCardNationalEmblem
=
null
}
}
uploadFiles
(
tempFile
:
any
):
Promise
<
FileInfo
>
{
uploadFiles
(
tempFile
:
any
):
Promise
<
FileInfo
>
{
this
.
onload
=
true
;
this
.
onload
=
true
;
const
authService
:
AuthService
=
this
.
$auth
;
const
authService
:
AuthService
=
this
.
$auth
;
...
...
Write
Preview
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