|
@@ -1,8 +1,25 @@
|
|
|
import axios from 'axios'
|
|
|
import qs from 'qs'
|
|
|
+import imgPath from "@/assets/image/jiazai.gif"
|
|
|
|
|
|
const TIME_OUT_MS = 60 * 1000 // 默认请求超时时间
|
|
|
|
|
|
+function prompt() {
|
|
|
+ window.ELEMENT.Message({
|
|
|
+ message: `<div style="display: flex;justify-content: center;flex-wrap: wrap;margin: 20px 0">
|
|
|
+ <img src="${imgPath}" alt="" style="width: 122px;height: 85px;margin-bottom: 20px">
|
|
|
+ <p style="width: 100%;text-align: center;color: #999"> 技术人员更新系统中,请一分钟后重试</p></div>`,
|
|
|
+ type: 'info',
|
|
|
+ dangerouslyUseHTMLString: true,
|
|
|
+ center: true,
|
|
|
+ iconClass: 'el-icon'
|
|
|
+ })
|
|
|
+ console.log('执行多少次')
|
|
|
+}
|
|
|
+
|
|
|
+// 定时器
|
|
|
+let timer = null
|
|
|
+
|
|
|
/*
|
|
|
* @param response 返回数据列表
|
|
|
*/
|
|
@@ -56,12 +73,14 @@ export default {
|
|
|
if (exception) {
|
|
|
var str = error + ''
|
|
|
if(str.indexOf('504') != '-1' || str.indexOf('502') != '-1') {
|
|
|
- exception('服务器维护中,请稍后重试')
|
|
|
+ if (timer) clearTimeout(timer)
|
|
|
+ timer = setTimeout(() => {
|
|
|
+ prompt()
|
|
|
+ }, 3000)
|
|
|
} else {
|
|
|
exception(error)
|
|
|
}
|
|
|
} else {
|
|
|
- console.log('执行好吧')
|
|
|
console.log(error, 3)
|
|
|
}
|
|
|
}
|