[FIX] 添加产品列表页Loading

This commit is contained in:
wangmingzhe
2019-12-26 14:40:05 +08:00
parent c5961d285a
commit ba3fbb47d8

View File

@@ -104,6 +104,12 @@ export default {
if (saleInsuredPersonInfo && saleInsuredPersonInfo.insuredId) {
insuredId = saleInsuredPersonInfo.insuredId
}
this.$toast.loading({
duration: 0, // 持续展示 toast
forbidClick: true, // 禁用背景点击
loadingType: 'spinner',
message: '加载中……'
})
resultData = await getDetail({
orderNo: localStorage.orderNo,
isMerge: '1',
@@ -111,6 +117,12 @@ export default {
orderDTO: { insuredDTOs: [{ insuredId: insuredId }] }
})
} else {
this.$toast.loading({
duration: 0, // 持续展示 toast
forbidClick: true, // 禁用背景点击
loadingType: 'spinner',
message: '加载中……'
})
resultData = await orderDetail({ orderNo: localStorage.orderNo, isMerge: '1' })
}
if (resultData.result == 0) {
@@ -126,27 +138,21 @@ export default {
this.total = resultData.orderDTO.orderInfoDTO.orderAmount * 100
//险种数据格式化
riskDTOLst = resultData.orderDTO.insuredDTOs[0].riskDTOLst
if (riskDTOLst.length == 0) {
this.isShow = true
} else {
this.isShow = false
}
}
if (!riskDTOLst) riskDTOLst = []
this.$utils.intLocalStorage(resultData, isProposal)
this.chooseProducts = formatAllRisk(riskDTOLst)
console.log(this.chooseProducts)
if (!isProposal) {
if (this.chooseProducts.length == 0) {
this.isShow = true
} else {
// if (this.chooseProducts[0].riskCode == 'GFRS_M0011') {
// this.isShow = true
// } else {
this.isShow = false
// }
}
}
if (riskDTOLst.length > 0) {
this.nextStepFlag = false
}
this.$toast.clear()
} else {
this.$toast(resultData.resultMessage)
}