微信端上传补充资料

This commit is contained in:
mengxiaolong
2020-08-27 11:43:56 +08:00
parent 4327679fe8
commit 294e9225a5

View File

@@ -176,17 +176,17 @@ export default {
methods: { methods: {
// 补充资料问题件被保人上传身份证照片 // 补充资料问题件被保人上传身份证照片
async uploadSupplementImg(file) { async uploadSupplementImg(file) {
console.dir(file)
if (this.isWeixin) { if (this.isWeixin) {
localStorage.setItem('supplementImages', JSON.stringify(this.imageList)) localStorage.setItem('supplementImages', JSON.stringify(this.imageList))
} else {
let res = await this.afterRead(file)
let result = {
rgssUrl: res.path,
imageInfoType: 1,
subBusinessType: 1
}
this.imageResultList.push(result)
} }
let res = await this.afterRead(file)
let result = {
rgssUrl: res.path,
imageInfoType: 1,
subBusinessType: 1
}
this.imageResultList.push(result)
}, },
checkSupplementData() { checkSupplementData() {
return this.imageResultList.length !== 0 return this.imageResultList.length !== 0
@@ -364,7 +364,7 @@ export default {
return await uploadImg(data) return await uploadImg(data)
}, },
// 下一步 // 下一步
submit() { async submit() {
// 校验回复内容 // 校验回复内容
if (this.issueType === 'TB89' && this.newContract.feedback.trim() === '') return this.$toast('请填写具体回复信息') if (this.issueType === 'TB89' && this.newContract.feedback.trim() === '') return this.$toast('请填写具体回复信息')
if (this.issueType === 'TB89' && (this.newContract.feedback.trim().length < 4 || this.newContract.feedback.trim().length > 400)) if (this.issueType === 'TB89' && (this.newContract.feedback.trim().length < 4 || this.newContract.feedback.trim().length > 400))
@@ -372,6 +372,19 @@ export default {
// 校验补充资料 // 校验补充资料
if (this.issueType === '828601') { if (this.issueType === '828601') {
if (!this.checkSupplementData()) return this.$toast('请上传补充资料') if (!this.checkSupplementData()) return this.$toast('请上传补充资料')
if (this.isWeixin) {
this.$toast.loading()
for (let image of this.imageList) {
let res = await this.afterRead(image)
let result = {
rgssUrl: res.path,
imageInfoType: 1,
subBusinessType: 1
}
this.imageResultList.push(result)
}
this.$toast.clear()
}
} }
// 转账不成功 // 转账不成功
if (this.issueType === '818901') { if (this.issueType === '818901') {
@@ -456,23 +469,27 @@ export default {
problemData.list.push(this.transfer.cardUploadResult) problemData.list.push(this.transfer.cardUploadResult)
} }
} }
this.$toast.loading()
// 更新问题件数据 // 更新问题件数据
let res = await updateQuestionDetail(problemData) try {
this.$toast.clear() this.$toast.loading()
if (res.result === '1') { let res = await updateQuestionDetail(problemData)
localStorage.setItem('failedReason', res.resultMessage) this.$toast.clear()
} if (res.result === '1') {
this.$jump({ localStorage.setItem('failedReason', res.resultMessage)
flag: 'h5',
extra: {
url: location.origin + `/#/questions/result/${res.result}`,
forbidSwipeBack: '1'
},
routerInfo: {
path: `/questions/result/${res.result}`
} }
}) this.$jump({
flag: 'h5',
extra: {
url: location.origin + `/#/questions/result/${res.result}`,
forbidSwipeBack: '1'
},
routerInfo: {
path: `/questions/result/${res.result}`
}
})
} catch (reason) {
console.log('网络异常')
}
} }
}, },
async getQuestionDetail() { async getQuestionDetail() {
@@ -640,7 +657,13 @@ export default {
} }
} }
// 补充资料问题件回显资料照片 {
// 微信签名后回显补充资料照片
if (localStorage.getItem('supplementImages')) {
let images = JSON.parse(localStorage.getItem('supplementImages'))
this.imageList.push(...images)
}
}
} }
this.getBankList() this.getBankList()
this.getQuestionDetail() this.getQuestionDetail()