浏览代码

重定向逻辑完善

shaogen1995 1 月之前
父节点
当前提交
58a39cb6a6
共有 1 个文件被更改,包括 4 次插入1 次删除
  1. 4 1
      index.html

+ 4 - 1
index.html

@@ -38,7 +38,10 @@
         const redirectObj = redirect.find(v => v.code == number)
 
         if (redirectObj) {
-            window.location.href = window.location.href.replace('https://www.4dmodel.com/SuperTwo/index.html', redirectObj.url)
+            if (window.location.href.includes('https://www.4dmodel.com/SuperTwo/index.html')) {
+
+                window.location.href = window.location.href.replace('https://www.4dmodel.com/SuperTwo/index.html', redirectObj.url)
+            }
         }