增加20S禁止重复提交的操作逻辑

This commit is contained in:
liu.xiaofeng@ebiz-digits.com
2023-09-21 21:55:38 +08:00
parent 67c1609047
commit 0c5cb94008

View File

@@ -1040,6 +1040,11 @@ export default {
confirmButtonColor: '#E9332E', confirmButtonColor: '#E9332E',
}) })
.then(() => { .then(() => {
let nowTime = new Date().getTime()
let localTime = window.localStorage.getItem('serrorTime')
if(nowTime - localTime < 20000){
this.$toast('您操作过于频繁20s内请勿重复提交')
}else{
let data = { let data = {
orderDTO: { orderDTO: {
orderInfoDTO: { orderInfoDTO: {
@@ -1084,6 +1089,8 @@ export default {
}, },
}) })
} else { } else {
let thisTime = new Date().getTime()
window.localStorage.setItem('serrorTime',thisTime)
if(res.resultMessage.indexOf('Engine')!= -1){ if(res.resultMessage.indexOf('Engine')!= -1){
this.thisdialogshow = true this.thisdialogshow = true
// let thisdialogcontent = '【Engine】投保人电子邮箱已被其他投保人使用哦请确认并重新录入如有疑问请拨打4006946688进行咨询【Engine】被保人与投保人关系需为本人、配偶、子女、父母人工审核中请您耐心等待哦~' // let thisdialogcontent = '【Engine】投保人电子邮箱已被其他投保人使用哦请确认并重新录入如有疑问请拨打4006946688进行咨询【Engine】被保人与投保人关系需为本人、配偶、子女、父母人工审核中请您耐心等待哦~'
@@ -1099,10 +1106,16 @@ export default {
} }
} }
}) })
}
}) })
.catch(() => { .catch(() => {
return return
}) })
} else {
let nowTime = new Date().getTime()
let localTime = window.localStorage.getItem('serrorTime')
if(nowTime - localTime < 20000){
this.$toast('您操作过于频繁20s内请勿重复提交')
}else { }else {
let data = { let data = {
orderDTO: { orderDTO: {
@@ -1148,6 +1161,8 @@ export default {
}, },
}) })
} else { } else {
let thisTime = new Date().getTime()
window.localStorage.setItem('serrorTime',thisTime)
if (res.resultMessage.indexOf('Engine') != -1) { if (res.resultMessage.indexOf('Engine') != -1) {
this.thisdialogshow = true this.thisdialogshow = true
// let thisdialogcontent = '【Engine】投保人电子邮箱已被其他投保人使用哦请确认并重新录入如有疑问请拨打4006946688进行咨询【Engine】被保人与投保人关系需为本人、配偶、子女、父母人工审核中请您耐心等待哦~' // let thisdialogcontent = '【Engine】投保人电子邮箱已被其他投保人使用哦请确认并重新录入如有疑问请拨打4006946688进行咨询【Engine】被保人与投保人关系需为本人、配偶、子女、父母人工审核中请您耐心等待哦~'
@@ -1164,6 +1179,7 @@ export default {
} }
}) })
} }
}
}, },
}, },
computed: { computed: {