mirror of
http://112.124.100.131/GFRS/ebiz-h5.git
synced 2025-12-09 11:06:43 +08:00
上传附件图片上传失败增加提示以及响应图片集合清空
This commit is contained in:
@@ -878,7 +878,8 @@ export default {
|
||||
})
|
||||
let formdata = new FormData()
|
||||
formdata.append('imgPath', that.dataURLtoFile(that.file, that.imgName))
|
||||
uploadImg(formdata).then((res) => {
|
||||
uploadImg(formdata).then(
|
||||
(res) => {
|
||||
if (res.result == '0') {
|
||||
this.$toast.clear()
|
||||
if(res.result == 0 && res.path){
|
||||
@@ -1184,6 +1185,86 @@ export default {
|
||||
this.$toast.clear()
|
||||
this.$toast(res.resultMessage)
|
||||
}
|
||||
},
|
||||
(error) => {
|
||||
switch (that.type) {
|
||||
case 'fileListIdFront':
|
||||
that.fileListIdFront = []
|
||||
break
|
||||
case 'fileListIdBack':
|
||||
that.fileListIdBack = []
|
||||
break
|
||||
case 'fileLIstImg':
|
||||
that.fileLIstImg = []
|
||||
break
|
||||
case 'fileListBank':
|
||||
that.fileListBank = []
|
||||
break
|
||||
case 'fileListOther':
|
||||
that.fileListOther = []
|
||||
break
|
||||
case 'fileListIdFrontInsured':
|
||||
that.fileListIdFrontInsured = []
|
||||
break
|
||||
case 'fileListIdBackInsured':
|
||||
that.fileListIdBackInsured = []
|
||||
break
|
||||
case 'fileListBankInsured':
|
||||
that.fileListBankInsured = []
|
||||
break
|
||||
case 'fileLIstImgInsured':
|
||||
that.fileLIstImgInsured = []
|
||||
break
|
||||
case 'saleInsuredInfoOther':
|
||||
that.saleInsuredInfoOther = []
|
||||
break
|
||||
case 'saleInsuredPersonInfoOther':
|
||||
that.saleInsuredPersonInfoOther = []
|
||||
break
|
||||
}
|
||||
if(that.type == 'fileListIdFrontBeneficiary'){
|
||||
that.saleBtnfPersonInfo.forEach((item,index)=>{
|
||||
if(item.bnfId == that.bnfId){
|
||||
that.bnfInfo[index].fileListIdFrontBeneficiary = []
|
||||
}
|
||||
})
|
||||
}
|
||||
if(that.type == 'fileListIdBackBeneficiary'){
|
||||
that.saleBtnfPersonInfo.forEach((item,index)=>{
|
||||
if(item.bnfId == that.bnfId){
|
||||
that.bnfInfo[index].fileListIdBackBeneficiary = []
|
||||
}
|
||||
})
|
||||
}
|
||||
if(that.type == 'fileLIstImgBeneficiary'){
|
||||
that.saleBtnfPersonInfo.forEach((item,index)=>{
|
||||
if(item.bnfId == that.bnfId){
|
||||
that.bnfInfo[index].fileLIstImgBeneficiary = []
|
||||
}
|
||||
})
|
||||
}
|
||||
if(that.type == 'fileListIdFrontBeneficiary'){
|
||||
that.saleBtnfPersonInfo.forEach((item,index)=>{
|
||||
if(item.bnfId == that.bnfId){
|
||||
that.bnfInfo[index].fileListIdFrontBeneficiary = []
|
||||
}
|
||||
})
|
||||
}
|
||||
if(that.type == 'fileListIdBackBeneficiary'){
|
||||
that.saleBtnfPersonInfo.forEach((item,index)=>{
|
||||
if(item.bnfId == that.bnfId){
|
||||
that.bnfInfo[index].fileListIdBackBeneficiary = []
|
||||
}
|
||||
})
|
||||
}
|
||||
if(that.type == 'fileLIstImgBeneficiary'){
|
||||
that.saleBtnfPersonInfo.forEach((item,index)=>{
|
||||
if(item.bnfId == that.bnfId){
|
||||
that.bnfInfo[index].fileLIstImgBeneficiary = []
|
||||
}
|
||||
})
|
||||
}
|
||||
this.$toast('网络环境不佳,图片上传失败,请切换移动网络或稍后重试')
|
||||
}
|
||||
)
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user