Commit 7a1263e1 authored by “lixuyan”'s avatar “lixuyan”

放开loading定时器

parent c6a02181
...@@ -13,7 +13,7 @@ import disShowErrorMsg from './disShowErrorMsg' ...@@ -13,7 +13,7 @@ import disShowErrorMsg from './disShowErrorMsg'
import guid from '@/utils/util' import guid from '@/utils/util'
let ajaxCount = 0 let ajaxCount = 0
let loadingInstance let loadingInstance
const ajaxTimer = {} let ajaxTimer = {}
const disShowLadingRequestUrl = [ const disShowLadingRequestUrl = [
// '/RepoFileUpload/find/recursion' // '/RepoFileUpload/find/recursion'
'/RepoFileUpload/findWithCondition', '/RepoFileUpload/findWithCondition',
...@@ -44,13 +44,13 @@ axios.interceptors.request.use( ...@@ -44,13 +44,13 @@ axios.interceptors.request.use(
fullscreen: true, fullscreen: true,
background: 'rgba(0, 0, 0, 0.0)' background: 'rgba(0, 0, 0, 0.0)'
}) })
// ajaxTimer = window.setTimeout(() => { ajaxTimer = window.setTimeout(() => {
// if (loadingInstance) { if (loadingInstance) {
// loadingInstance.close() loadingInstance.close()
// } }
// ajaxCount = 0 ajaxCount = 0
// }, 50000) }, 50000)
// ajaxCount++ ajaxCount++
} }
if (!localStorage.getItem('uid')) { if (!localStorage.getItem('uid')) {
localStorage.setItem('uid', guid.guid()) localStorage.setItem('uid', guid.guid())
...@@ -100,12 +100,12 @@ axios.interceptors.response.use( ...@@ -100,12 +100,12 @@ axios.interceptors.response.use(
return response && response.config.url.includes(el) return response && response.config.url.includes(el)
}) })
if (!disLoading) { if (!disLoading) {
// ajaxCount > 0 ? ajaxCount-- : ajaxCount = 0 ajaxCount > 0 ? ajaxCount-- : ajaxCount = 0
// if (ajaxCount === 0) { if (ajaxCount === 0) {
// loadingInstance.close()
// window.clearTimeout(ajaxTimer)
// }
loadingInstance.close() loadingInstance.close()
window.clearTimeout(ajaxTimer)
}
// loadingInstance.close()
} }
if (response.headers.token) { if (response.headers.token) {
store.dispatch('user/updateToken', response.headers.token) store.dispatch('user/updateToken', response.headers.token)
......
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