Commit c9e51196 authored by arvin's avatar arvin

http 接口loding 计时器关闭

parent af64845c
......@@ -40,13 +40,13 @@ axios.interceptors.request.use(
fullscreen: true,
background: 'rgba(0, 0, 0, 0.0)'
})
ajaxTimer = window.setTimeout(() => {
if (loadingInstance) {
loadingInstance.close()
}
ajaxCount = 0
}, 50000)
ajaxCount++
// ajaxTimer = window.setTimeout(() => {
// if (loadingInstance) {
// loadingInstance.close()
// }
// ajaxCount = 0
// }, 50000)
// ajaxCount++
}
if (!localStorage.getItem('uid')) {
localStorage.setItem('uid', guid.guid())
......@@ -96,11 +96,12 @@ axios.interceptors.response.use(
return response && response.config.url.includes(el)
})
if (!disLoading) {
ajaxCount > 0 ? ajaxCount-- : ajaxCount = 0
if (ajaxCount === 0) {
loadingInstance.close()
window.clearTimeout(ajaxTimer)
}
// ajaxCount > 0 ? ajaxCount-- : ajaxCount = 0
// if (ajaxCount === 0) {
// loadingInstance.close()
// window.clearTimeout(ajaxTimer)
// }
loadingInstance.close()
}
if (response.headers.token) {
store.dispatch('user/updateToken', response.headers.token)
......
<template>
<div v-dee-loading="loading" class="TfMomWebUnit-model">
<div class="TfMomWebUnit-model">
<div class="search-bar">
<el-input v-model="AOname" size="small" placeholder="AO(号/名称)" class="input-with-select">
<el-button slot="append" icon="el-icon-search" @click="search" />
......
<template>
<div v-dee-loading="loading" class="TfMomWebView-model">
<div class="TfMomWebView-model">
<div class="search-bar">
<el-input v-model="AOname" size="small" placeholder="AO(号/名称)" class="input-with-select">
<el-button slot="append" icon="el-icon-search" @click="search" />
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment