Commit 226fcad4 authored by 张锡奇's avatar 张锡奇

upload

parent adf613ab
...@@ -68,6 +68,7 @@ ...@@ -68,6 +68,7 @@
flex-wrap: wrap; flex-wrap: wrap;
>img{ >img{
width:20%; width:20%;
height:20%;
margin-right:5%; margin-right:5%;
margin-bottom: 5%; margin-bottom: 5%;
} }
...@@ -146,7 +147,7 @@ export default { ...@@ -146,7 +147,7 @@ export default {
var filePath = file.value; //js中无法获取文件的真是路径 var filePath = file.value; //js中无法获取文件的真是路径
var fileName = filePath.substring(filePath.lastIndexOf('\\')+1); //文件名 var fileName = filePath.substring(filePath.lastIndexOf('\\')+1); //文件名
var extName = fileName.substring(fileName.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({ that.$vux.confirm.show({
title:"提示", title:"提示",
content:`不允许上传${extName}格式图片!`, content:`不允许上传${extName}格式图片!`,
...@@ -200,9 +201,7 @@ export default { ...@@ -200,9 +201,7 @@ export default {
content:data, content:data,
showCancelButton:false, showCancelButton:false,
}) })
this.fileList.push({ this.fileList = [{src:base64}]
src:base64
})
} }
}else if(xhr.status == 500){ }else if(xhr.status == 500){
let data = doc.getElementsByTagName('soap:Text')[0].firstChild.nodeValue; let data = doc.getElementsByTagName('soap:Text')[0].firstChild.nodeValue;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment