Skip to content

Commit c2dd835

Browse files
committed
fix dev|900中英版本切换问题
1 parent e0e598e commit c2dd835

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

examples/js/common.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ $(document).ready(function () {
5151
function getVersion() {
5252
var pathname = window.location.pathname.replace("/en/", "/");
5353
var match = pathname.match(/^\/(dev|(?:\d+\.)+\d)\/.*/);//匹配版本:dev|9.0.0
54-
return match && match[1] ? match[1] : null;
54+
return match && match[1] ? match[1] : null;
5555
}
5656

5757

@@ -95,8 +95,8 @@ $(document).ready(function () {
9595
var href = window.location.origin + pathname;
9696
if (lang === "en-US") {
9797
if (getVersion()) {
98-
// href = window.location.origin + pathname.replace(/([^\/]*\/){1}([^\/]*)/, '$1$2/en');
99-
href = window.location.origin + pathname.replace(/([^\/]*\/){2}([^\/]*)/, '/$1$2/en');
98+
href = window.location.origin + pathname.replace(/([^\/]*\/){1}([^\/]*)/, '$1$2/en');
99+
//href = window.location.origin + pathname.replace(/([^\/]*\/){2}([^\/]*)/, '/$1$2/en');
100100
} else if (window.isLocal) {
101101
href = window.location.origin + pathname.replace(/(([^\/]*\/){3})([^\/]*)/, '$1$3/en')
102102
} else {

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy