From 294e9225a56c5728e67dcbe5e5a920660ba592d2 Mon Sep 17 00:00:00 2001 From: mengxiaolong Date: Thu, 27 Aug 2020 11:43:56 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BE=AE=E4=BF=A1=E7=AB=AF=E4=B8=8A=E4=BC=A0?= =?UTF-8?q?=E8=A1=A5=E5=85=85=E8=B5=84=E6=96=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/ebiz/questions/QuestionsDetail.vue | 73 +++++++++++++------- 1 file changed, 48 insertions(+), 25 deletions(-) diff --git a/src/views/ebiz/questions/QuestionsDetail.vue b/src/views/ebiz/questions/QuestionsDetail.vue index 8531750a3..e9a6c978b 100644 --- a/src/views/ebiz/questions/QuestionsDetail.vue +++ b/src/views/ebiz/questions/QuestionsDetail.vue @@ -176,17 +176,17 @@ export default { methods: { // 补充资料问题件被保人上传身份证照片 async uploadSupplementImg(file) { - console.dir(file) if (this.isWeixin) { 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() { return this.imageResultList.length !== 0 @@ -364,7 +364,7 @@ export default { 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().length < 4 || this.newContract.feedback.trim().length > 400)) @@ -372,6 +372,19 @@ export default { // 校验补充资料 if (this.issueType === '828601') { 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') { @@ -456,23 +469,27 @@ export default { problemData.list.push(this.transfer.cardUploadResult) } } - this.$toast.loading() // 更新问题件数据 - let res = await updateQuestionDetail(problemData) - this.$toast.clear() - if (res.result === '1') { - localStorage.setItem('failedReason', res.resultMessage) - } - this.$jump({ - flag: 'h5', - extra: { - url: location.origin + `/#/questions/result/${res.result}`, - forbidSwipeBack: '1' - }, - routerInfo: { - path: `/questions/result/${res.result}` + try { + this.$toast.loading() + let res = await updateQuestionDetail(problemData) + this.$toast.clear() + if (res.result === '1') { + localStorage.setItem('failedReason', res.resultMessage) } - }) + 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() { @@ -640,7 +657,13 @@ export default { } } - // 补充资料问题件回显资料照片 + { + // 微信签名后回显补充资料照片 + if (localStorage.getItem('supplementImages')) { + let images = JSON.parse(localStorage.getItem('supplementImages')) + this.imageList.push(...images) + } + } } this.getBankList() this.getQuestionDetail()