|
@@ -12,6 +12,7 @@ function prompt() {
|
|
|
type: 'info',
|
|
|
dangerouslyUseHTMLString: true,
|
|
|
center: true,
|
|
|
+ duration: 10000,
|
|
|
iconClass: 'el-icon'
|
|
|
})
|
|
|
console.log('执行多少次')
|
|
@@ -19,6 +20,8 @@ function prompt() {
|
|
|
|
|
|
// 定时器
|
|
|
let timer = null
|
|
|
+let timer2 = null
|
|
|
+let flgs = 0
|
|
|
|
|
|
/*
|
|
|
* @param response 返回数据列表
|
|
@@ -73,10 +76,18 @@ export default {
|
|
|
if (exception) {
|
|
|
var str = error + ''
|
|
|
if(str.indexOf('504') != '-1' || str.indexOf('502') != '-1') {
|
|
|
- if (timer) clearTimeout(timer)
|
|
|
- timer = setTimeout(() => {
|
|
|
- prompt()
|
|
|
- }, 3000)
|
|
|
+
|
|
|
+ if (flgs == 0) {
|
|
|
+ timer = setTimeout(() => {
|
|
|
+ prompt()
|
|
|
+ }, 100)
|
|
|
+ flgs++
|
|
|
+ clearTimeout(timer2)
|
|
|
+ timer2 = setTimeout(() => {
|
|
|
+ flgs = 0
|
|
|
+ }, 12000)
|
|
|
+ }
|
|
|
+
|
|
|
} else {
|
|
|
exception(error)
|
|
|
}
|