|
@@ -10,16 +10,26 @@ export async function showFullScreenLoading(store) {
|
|
|
await store.dispatch('app/setLoadStatus', true)
|
|
|
load.startLoading()
|
|
|
} else {
|
|
|
- await store.dispatch('app/setLoadCount', 1)
|
|
|
- clearTimeout(timer)
|
|
|
- timer = null
|
|
|
+ if(store.getters.loadCount < 0){
|
|
|
+ await store.dispatch('app/resetLoadCount')
|
|
|
+ await store.dispatch('app/setLoadCount', 1)
|
|
|
+ clearTimeout(timer)
|
|
|
+ timer = null
|
|
|
+ }else{
|
|
|
+ await store.dispatch('app/setLoadCount', 1)
|
|
|
+ clearTimeout(timer)
|
|
|
+ timer = null
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
export async function tryHideFullScreenLoading(store) {
|
|
|
+ console.log(store.getters.loadCount)
|
|
|
await store.dispatch('app/setLoadCount', -1)
|
|
|
+
|
|
|
if (store.getters.loadCount <= 0 && store.getters.isLoading) {
|
|
|
if(timer)return
|
|
|
timer = setTimeout(async () => {
|