Forráskód Böngészése

Merge branch 'master' into feature/v4.9.14

lianbingjie 1 éve
szülő
commit
154d30a66b
1 módosított fájl, 10 hozzáadás és 3 törlés
  1. 10 3
      src/web/templates/pc/reloadTo.html

+ 10 - 3
src/web/templates/pc/reloadTo.html

@@ -7,9 +7,16 @@
 </head>
 </head>
 <body>
 <body>
 <script>
 <script>
-    window.onload = function () {
-        window.location.href ={{.T.transfer}}
+  window.onload = function () {
+    var transfer = {{.T.transfer}};
+    var targetPattern = /\/content\/(.+?)\./; // 匹配目标字符串
+    var match = transfer.match(targetPattern);
+    if (match && match[1]) {
+      window.location.href = transfer.replace(/\/content\/(.+?)\./, "/content/" + encodeURIComponent(match[1]) + ".");
+      return
     }
     }
+    window.location.href = {{.T.transfer}};
+  }
 </script>
 </script>
 </body>
 </body>
-</html>
+</html>