mirror of
http://112.124.100.131/GFRS/ebiz-h5.git
synced 2025-12-20 16:36:45 +08:00
修改上传图片分类, 优化接口报错处理
This commit is contained in:
@@ -14,7 +14,10 @@
|
||||
{{ supplement.descriptionInsurant }}
|
||||
</p>
|
||||
</div>
|
||||
<van-uploader :after-read="insurantUpload" name="id" v-model="supplement.idImgList" />
|
||||
<p class="uploadTitle">身份证正面照片</p>
|
||||
<van-uploader :max-count="1" :after-read="insurantUpload" name="insurantIdCardA" v-model="supplement.insurantIdCardA" />
|
||||
<p class="uploadTitle">身份证背面照片</p>
|
||||
<van-uploader :max-count="1" :after-read="insurantUpload" name="insurantIdCardB" v-model="supplement.insurantIdCardB" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="updateInfo">
|
||||
@@ -26,7 +29,12 @@
|
||||
{{ supplement.descriptionPolicyholder }}
|
||||
</p>
|
||||
</div>
|
||||
<van-uploader :after-read="policyHolderUpload" name="copy" v-model="supplement.copyImgList" />
|
||||
<p class="uploadTitle">身份证正面照片</p>
|
||||
<van-uploader :max-count="1" :after-read="policyHolderUpload" name="policyholderIdCardA" v-model="supplement.policyholderIdCardA" />
|
||||
<p class="uploadTitle">身份证背面照片</p>
|
||||
<van-uploader :max-count="1" :after-read="policyHolderUpload" name="policyholderIdCardB" v-model="supplement.policyholderIdCardB" />
|
||||
<p class="uploadTitle">银行卡照片</p>
|
||||
<van-uploader :max-count="1" :after-read="policyHolderUpload" name="policyholderBankCardA" v-model="supplement.policyholderBankCardA" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -145,10 +153,13 @@ export default {
|
||||
// 投保人问题描述
|
||||
descriptionPolicyholder: '',
|
||||
// 被保人身份证明
|
||||
idImgList: [],
|
||||
insurantIdCardA: [],
|
||||
insurantIdCardB: [],
|
||||
insurantUploadResult: [],
|
||||
// 投保人身份证明等资料
|
||||
copyImgList: [],
|
||||
policyholderIdCardA: [],
|
||||
policyholderIdCardB: [],
|
||||
policyholderBankCardA: [],
|
||||
policyholderUploadResult: []
|
||||
},
|
||||
newContract: {
|
||||
@@ -192,19 +203,29 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async policyHolderUpload(file) {
|
||||
async policyHolderUpload(file, detail) {
|
||||
// 微信端将上传的图片保存到localstorage中供签名回调使用
|
||||
if (this.isWeixin) {
|
||||
localStorage.setItem(detail.name, file.content)
|
||||
}
|
||||
let res = await this.afterRead(file)
|
||||
this.supplement.policyholderUploadResult.push({
|
||||
rgssUrl: res.path
|
||||
})
|
||||
},
|
||||
async insurantUpload(file) {
|
||||
async insurantUpload(file, detail) {
|
||||
if (this.isWeixin) {
|
||||
localStorage.setItem(detail.name, file.content)
|
||||
}
|
||||
let res = await this.afterRead(file)
|
||||
this.supplement.insurantUploadResult.push({
|
||||
rgssUrl: res.path
|
||||
})
|
||||
},
|
||||
async cardUpload(file) {
|
||||
async cardUpload(file, detail) {
|
||||
if (this.isWeixin) {
|
||||
localStorage.setItem(detail.name, file.content)
|
||||
}
|
||||
let res = await this.afterRead(file)
|
||||
this.transfer.cardUploadResult.push({
|
||||
rgssUrl: res.path
|
||||
@@ -522,6 +543,11 @@ export default {
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.uploadTitle {
|
||||
font-size: 14px;
|
||||
margin-bottom: 0.5em;
|
||||
}
|
||||
|
||||
.bottom-btn {
|
||||
z-index: 1;
|
||||
}
|
||||
@@ -620,7 +646,6 @@ export default {
|
||||
}
|
||||
p {
|
||||
line-height: 22px;
|
||||
padding-bottom: 7px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -119,7 +119,7 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
active: 0,
|
||||
pendingListLoading: false,
|
||||
pendingListLoading: true,
|
||||
processedListLoading: false,
|
||||
pendingListFinished: false,
|
||||
processedListFinished: false,
|
||||
@@ -149,33 +149,46 @@ export default {
|
||||
this.searchValue = ''
|
||||
},
|
||||
async loadMore() {
|
||||
const rs = await getQuestionList({
|
||||
type: this.active,
|
||||
pageInfo: {
|
||||
pageNum: this.currentPage,
|
||||
pageSize: this.pageSize,
|
||||
keyword: this.searchValue ? this.searchValue : ''
|
||||
}
|
||||
})
|
||||
if (rs && rs.result === '0') {
|
||||
this.currentPage++
|
||||
if (this.active === 0) {
|
||||
this.pendingListLoading = false
|
||||
this.pendingList.push(...rs.content.list)
|
||||
try {
|
||||
const rs = await getQuestionList({
|
||||
type: this.active,
|
||||
pageInfo: {
|
||||
pageNum: this.currentPage,
|
||||
pageSize: this.pageSize,
|
||||
keyword: this.searchValue ? this.searchValue : ''
|
||||
}
|
||||
})
|
||||
if (rs && rs.result === '0') {
|
||||
this.currentPage++
|
||||
if (this.active === 0) {
|
||||
this.pendingListLoading = false
|
||||
this.pendingList.push(...rs.content.list)
|
||||
this.pendingList.sort((prev, next) => {
|
||||
return -(new Date(prev.createdTime).getTime() - new Date(next.createdTime).getTime())
|
||||
})
|
||||
} else {
|
||||
this.processedListLoading = false
|
||||
this.processedList.push(...rs.content.list)
|
||||
this.processedList.sort((prev, next) => {
|
||||
return -(new Date(prev.createdTime).getTime() - new Date(next.createdTime).getTime())
|
||||
})
|
||||
}
|
||||
if (rs.content.pageNum >= rs.content.pages && this.active === 0) {
|
||||
this.pendingListFinished = true
|
||||
} else if (rs.content.pageNum >= rs.content.pages && this.active === 1) {
|
||||
this.processedListFinished = true
|
||||
}
|
||||
} else {
|
||||
this.processedListLoading = false
|
||||
this.processedList.push(...rs.content.list)
|
||||
}
|
||||
if (rs.content.pageNum >= rs.content.pages && this.active === 0) {
|
||||
this.pendingListFinished = true
|
||||
} else if (rs.content.pageNum >= rs.content.pages && this.active === 1) {
|
||||
this.processedListFinished = true
|
||||
this.pendingListLoading = false
|
||||
this.processedListLoading = false
|
||||
}
|
||||
} else {
|
||||
this.pendingListFinished = true
|
||||
this.processedListFinished = true
|
||||
} catch (reson) {
|
||||
this.pendingListLoading = false
|
||||
this.pendingListFinished = true
|
||||
this.processedListLoading = false
|
||||
this.processedListFinished = true
|
||||
}
|
||||
},
|
||||
changeProblemList() {
|
||||
|
||||
Reference in New Issue
Block a user