更正代码

pull/425/MERGE
ChenX 5 years ago
parent 975841edea
commit 174c40b86a

@ -6,25 +6,23 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<script>
if (location.hostname === "localhost")
return;
fetch("ver.json").then(res => {
if (!res.ok) return;
res.json().then(v => {
if (res.status)
if (v)
{
let oldVer = sessionStorage.getItem("ver");
sessionStorage.setItem("ver", v);
if (oldVer && oldVer != v)
if (location.hostname !== "localhost")
fetch("ver.json").then(res => {
if (!res.ok) return;
res.json().then(v => {
if (res.status)
if (v)
{
document.body.textContent = "发现新版本,升级中!";
location.reload();
let oldVer = sessionStorage.getItem("ver");
sessionStorage.setItem("ver", v);
if (oldVer && oldVer != v)
{
document.body.textContent = "发现新版本,升级中!";
location.reload();
}
}
}
})
});
})
});
</script>
<title>WebCAD</title>
<meta itemprop="description" content="云端CAD,在线衣柜设计" />

Loading…
Cancel
Save