This commit is contained in:
姜棚 2022-01-21 14:36:20 +08:00
parent 88ef1a966b
commit 56831173ac
2 changed files with 2 additions and 3 deletions

View File

@ -802,7 +802,7 @@ export default class acclist extends React.Component{
if(my_file.name.indexOf(".xls")||my_file.name.indexOf(".xlsx")||my_file.name.indexOf(".csv")) if(my_file.name.indexOf(".xls")||my_file.name.indexOf(".xlsx")||my_file.name.indexOf(".csv"))
{ {
if(my_file.size > 5120000) if(my_file.size > 1024000)
{ {
Notify.error("文件大小不能大于2M") Notify.error("文件大小不能大于2M")
return; return;
@ -810,7 +810,6 @@ export default class acclist extends React.Component{
let formdata = new FormData() let formdata = new FormData()
formdata.append("file",my_file) formdata.append("file",my_file)
formdata.append("path","white_list_excel") formdata.append("path","white_list_excel")
console.log("上传文件",formdata)
this.setState({file_loading:true}) this.setState({file_loading:true})
uploadImg(formdata).then((res)=>{ uploadImg(formdata).then((res)=>{
handelResponse(res,(req,msg)=>{ handelResponse(res,(req,msg)=>{

View File

@ -659,7 +659,7 @@ export default class acclist extends React.Component{
if(my_file.name.indexOf(".xls")||my_file.name.indexOf(".xlsx")||my_file.name.indexOf(".csv")) if(my_file.name.indexOf(".xls")||my_file.name.indexOf(".xlsx")||my_file.name.indexOf(".csv"))
{ {
if(my_file.size > 5120000) if(my_file.size > 1024000)
{ {
Notify.error("文件大小不能大于2M") Notify.error("文件大小不能大于2M")
return; return;