添加了蒙层

This commit is contained in:
2020-11-02 16:11:45 +08:00
parent 8656e75e16
commit 8177140705
2 changed files with 18 additions and 0 deletions

View File

@@ -13,9 +13,11 @@ export interface Get {
}
let login: MessageType;
let count = 0;
const div: any = document.getElementById("make");
axios.interceptors.request.use((config)=>{
if(count == 0){
login = message.loading('加载中..', 0)
div.style.display = "block"
}
count++;
return config;
@@ -28,6 +30,7 @@ axios.interceptors.response.use((response)=>{
count--;
if(count == 0){
login();
div.style.display = "none"
}
console.log(count)
}, 1000)
@@ -44,6 +47,7 @@ axios.interceptors.response.use((response)=>{
count--;
if(count == 0){
login();
div.style.display = "none"
}
console.log(count)
}, 1000)