图片上传时机修改

This commit is contained in:
mengxiaolong
2020-09-08 15:40:44 +08:00
parent e456ff04da
commit 9bb1c11005

View File

@@ -179,13 +179,7 @@ export default {
if (this.isWeixin) { if (this.isWeixin) {
localStorage.setItem('supplementImages', JSON.stringify(this.imageList)) localStorage.setItem('supplementImages', JSON.stringify(this.imageList))
} else { } else {
let res = await this.afterRead(file) this.imageList.push(file)
let result = {
rgssUrl: res.path,
imageInfoType: 1,
subBusinessType: 1
}
this.imageResultList.push(result)
} }
}, },
deleteSupplementImg() { deleteSupplementImg() {
@@ -195,11 +189,7 @@ export default {
return true return true
}, },
checkSupplementData() { checkSupplementData() {
if (this.isWeixin) { return this.imageList.length !== 0
return this.imageList.length !== 0
} else {
return this.imageResultList.length !== 0
}
}, },
// 转账不成功问题件添加银行卡照片 // 转账不成功问题件添加银行卡照片
async cardUpload(file, detail) { async cardUpload(file, detail) {
@@ -391,9 +381,9 @@ export default {
} else if (this.$route.query.receiveType === '1') { } else if (this.$route.query.receiveType === '1') {
if (!this.policyholderSigned || !this.insurantSigned) return this.$toast('签名未完成, 请先进行签名') if (!this.policyholderSigned || !this.insurantSigned) return this.$toast('签名未完成, 请先进行签名')
} }
this.$toast.loading()
this.imageResultList.splice(0)
if (this.isWeixin) { if (this.isWeixin) {
this.$toast.loading()
this.imageResultList.splice(0)
for (let image of this.imageList) { for (let image of this.imageList) {
let file = this.dataURLtoFile(image.content, '.png') let file = this.dataURLtoFile(image.content, '.png')
let res = await this.afterRead({ file: file }) let res = await this.afterRead({ file: file })
@@ -404,8 +394,18 @@ export default {
} }
this.imageResultList.push(result) this.imageResultList.push(result)
} }
this.$toast.clear() } else {
for (let file of this.imageList) {
let res = await this.afterRead({ file: file })
let result = {
rgssUrl: res.path,
imageInfoType: 1,
subBusinessType: 1
}
this.imageResultList.push(result)
}
} }
this.$toast.clear()
} }
// 转账不成功 // 转账不成功
if (this.issueType === '818901') { if (this.issueType === '818901') {