Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Z
zhichan
Overview
Overview
Details
Activity
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
蒋勇
zhichan
Commits
ecb3a94a
Commit
ecb3a94a
authored
Jan 26, 2021
by
王昆
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
法人身份证正面图+声明书
parent
0dba71a6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
1 deletions
+26
-1
xgg-web/app/front/entry/public/js/supplement_hc.js
+24
-1
xgg-web/app/front/entry/supplement_hc.ejs
+2
-0
No files found.
xgg-web/app/front/entry/public/js/supplement_hc.js
View file @
ecb3a94a
...
...
@@ -24,6 +24,7 @@ var app = new Vue({
};
return
{
btnloading
:
false
,
uploadLoading
:
null
,
action
:
""
,
d
:{},
supportInfo
:
{
...
...
@@ -84,6 +85,7 @@ var app = new Vue({
let
xml
=
this
.
loadXML
(
res
);
let
ossUrl
=
xml
.
documentElement
.
getElementsByTagName
(
"Location"
)[
0
].
textContent
;
this
.
supportInfo
.
front_half_img
=
ossUrl
||
""
;
this
.
uploadLoading
.
close
();
console
.
log
(
xml
,
ossUrl
);
},
declarationFileSuccess
(
res
,
file
)
{
...
...
@@ -91,10 +93,17 @@ var app = new Vue({
let
xml
=
this
.
loadXML
(
res
);
let
ossUrl
=
xml
.
documentElement
.
getElementsByTagName
(
"Location"
)[
0
].
textContent
;
this
.
supportInfo
.
declaration_file
=
ossUrl
||
""
;
this
.
uploadLoading
.
close
();
console
.
log
(
xml
,
ossUrl
);
},
beforeAvatarUpload
(
file
)
{
console
.
log
(
file
);
const
isLt2M
=
file
.
size
/
1024
/
1024
<
20
;
if
(
!
isLt2M
)
{
this
.
$message
.
error
(
'上传头像图片大小不能超过 20MB!'
);
return
false
;
}
let
ext
=
".png"
;
let
fileNameArr
=
(
file
.
name
||
""
).
split
(
"."
);
if
(
fileNameArr
.
length
>
1
)
{
...
...
@@ -104,9 +113,23 @@ var app = new Vue({
console
.
log
(
ext
);
var
key
=
"zc_gth_hc_"
+
new
Date
().
getTime
()
+
this
.
randomString
(
8
)
+
ext
;
this
.
d
.
key
=
key
;
this
.
uploadLoading
=
this
.
$loading
({
lock
:
true
,
text
:
'正在上传中,请耐心等待'
,
spinner
:
'el-icon-loading'
,
background
:
'rgba(0, 0, 0, 0.7)'
});
setTimeout
(()
=>
{
this
.
uploadLoading
.
close
();
},
15000
);
return
true
;
},
randomString
(
len
)
{
uploadError
(
err
,
file
,
fileList
){
this
.
uploadLoading
.
close
();
},
randomString
(
len
)
{
len
=
len
||
32
;
let
chars
=
'0123456789abcdefghijklmnopqrstuvwxyz_'
;
let
maxPos
=
chars
.
length
;
...
...
xgg-web/app/front/entry/supplement_hc.ejs
View file @
ecb3a94a
...
...
@@ -273,6 +273,7 @@
:data=
"d"
:show-file-list=
"false"
:on-success=
"frontHalfImgSuccess"
:on-error=
"uploadError"
:before-upload=
"beforeAvatarUpload"
>
<img
v-if=
"supportInfo.front_half_img"
:src=
"supportInfo.front_half_img"
class=
"avatar"
>
<i
v-else
class=
"el-icon-plus avatar-uploader-icon"
></i>
...
...
@@ -287,6 +288,7 @@
:data=
"d"
:show-file-list=
"false"
:on-success=
"declarationFileSuccess"
:on-error=
"uploadError"
:before-upload=
"beforeAvatarUpload"
>
<img
v-if=
"supportInfo.declaration_file"
:src=
"supportInfo.declaration_file"
class=
"avatar"
>
<i
v-else
class=
"el-icon-plus avatar-uploader-icon"
></i>
...
...
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