Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
W
WX_h5
Project
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
godwithdh
WX_h5
Commits
226fcad4
Commit
226fcad4
authored
Apr 08, 2020
by
张锡奇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
upload
parent
adf613ab
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
4 deletions
+3
-4
index.vue
src/view/tiip/uploadImg/index.vue
+3
-4
No files found.
src/view/tiip/uploadImg/index.vue
View file @
226fcad4
...
...
@@ -68,6 +68,7 @@
flex-wrap: wrap;
>img{
width:20%;
height:20%;
margin-right:5%;
margin-bottom: 5%;
}
...
...
@@ -146,7 +147,7 @@ export default {
var
filePath
=
file
.
value
;
//js中无法获取文件的真是路径
var
fileName
=
filePath
.
substring
(
filePath
.
lastIndexOf
(
'
\
\'
)+1); //文件名
var extName = fileName.substring(fileName.lastIndexOf('
.
')+1); //后缀名
if(extName
!= '
png
' && extName != '
jpg
' && extName
!= '
jpeg
'){
if(extName
.toLocaleLowerCase() != '
png
' && extName.toLocaleLowerCase() != '
jpg
' && extName.toLocaleLowerCase()
!= '
jpeg
'){
that.$vux.confirm.show({
title:"提示",
content:`不允许上传${extName}格式图片!`,
...
...
@@ -200,9 +201,7 @@ export default {
content:data,
showCancelButton:false,
})
this.fileList.push({
src:base64
})
this.fileList = [{src:base64}]
}
}else if(xhr.status == 500){
let data = doc.getElementsByTagName('
soap
:
Text
')[0].firstChild.nodeValue;
...
...
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