下载按钮禁止重复点击

This commit is contained in:
BlackTeay 2023-03-28 15:48:48 +08:00
parent 79d3f38552
commit 5a8fcf8b57

View File

@ -84,6 +84,7 @@
downloading = false; downloading = false;
} else if (this.status == 404) { } else if (this.status == 404) {
console.log("视频不存在"); console.log("视频不存在");
downloading = false;
} }
} }
@ -97,6 +98,7 @@
} }
xhr.onerror = () => { xhr.onerror = () => {
console.error('网络或服务器错误'); console.error('网络或服务器错误');
downloading = false;
} }
xhr.send(); xhr.send();