shaogen1995 2 anni fa
parent
commit
af4ad7607f
3 ha cambiato i file con 14 aggiunte e 9 eliminazioni
  1. 3 2
      web/src/App.vue
  2. 9 6
      webM/src/App.vue
  3. 2 1
      webM/vue.config.js

+ 3 - 2
web/src/App.vue

@@ -10,6 +10,7 @@
 export default {
 
   created() {
+
     // 移动端和pc端的切换
     if (
       window.navigator.userAgent.match(
@@ -17,8 +18,8 @@ export default {
       )
     ) {
       // 移动端
-      if (window.location.href.includes("https://cssbbwg.4dage.com")) {
-        window.location.href='https://cssbbwg.4dage.com/mobile/index.html#/Layout/Home'
+      if (window.location.href.includes('en.capitalmuseum.org.cn')) {
+        window.location.href = window.location.origin + '/mobile/index.html#/Layout/Home'
         setTimeout(() => {
           location.reload(true);
         }, 200);

+ 9 - 6
webM/src/App.vue

@@ -1,6 +1,6 @@
 <template>
   <div id="app">
-    <Router-view/>
+    <Router-view />
   </div>
 </template>
 
@@ -18,21 +18,24 @@ export default {
     ) {
       // 移动端
     } else {
-      // PC端
-      if (window.location.href.includes("https://cssbbwg.4dage.com/")) {
-        window.location.href ='https://cssbbwg.4dage.com/'
+      console.log('----------',window.location.href);
+      if (window.location.href.includes('en.capitalmuseum.org.cn')) {
+        // PC端
+        window.location.href = window.location.origin
         setTimeout(() => {
           location.reload(true);
-        }, 1000);
+        }, 200);
+
       }
     }
+
   }
 
 }
 </script>
 
 <style lang="less">
-#app{
+#app {
   max-width: 500px;
   margin: 0 auto;
 }

+ 2 - 1
webM/vue.config.js

@@ -1,3 +1,4 @@
 module.exports = {
-  publicPath: './'
+  publicPath: './',
+  productionSourceMap: false,
 }