lanxin 9 месяцев назад
Родитель
Сommit
190da6bf25

Разница между файлами не показана из-за своего большого размера
+ 15509 - 18
web/package-lock.json


+ 45 - 14
web/src/App.vue

@@ -1,26 +1,57 @@
 <template>
-    <div class="vvvv">
-        <router-view/>
-        <div class="orientation-tip" v-if="isMobile">
-        <div>
-            <img :src="require('@/assets/images/project/landtip.png')" alt="" />
-            <p>请在竖屏模式观看</p>
-        </div>
-        </div>
+  <div class="vvvv">
+    <router-view />
+    <div class="orientation-tip" v-if="isMobile">
+      <div>
+        <img :src="require('@/assets/images/project/landtip.png')" alt="" />
+        <p>请在竖屏模式观看</p>
+      </div>
     </div>
+  </div>
 </template>
 
 <script>
 import '@/assets/style/reset.less'
 import '@/assets/style/public.less'
+import axios from '@/utils/request'
 export default {
-    
-}
+  data() {
+    return {
+      baseURL: ''
+    }
+  },
+  // 移动端和pc端切换
+  created() {
+    console.log(axios.defaults.baseURL, 'axios.defaults.baseURL')
+    this.baseURL = axios.defaults.baseURL
+    // pc代码,但是手机端进来
+    if (
+      window.navigator.userAgent.match(
+        /(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i
+      )
+    ) {
+      if (this.baseURL === 'http://192.168.20.245:8005/' || '') {
+        console.log(window.location.href, 'window.location.hre1f')
+        if (window.location.href.includes('webM')) return
+        window.location.href = window.location.href.replace("web", "webM")
+      }
+    } else {
+      // 移动端代码,但是pc端进来
+      if (this.baseURL === 'http://192.168.20.245:8005/' || '') {
+        console.log(window.location.href, 'window.location.hre2f')
+        window.location.href = window.location.href.replace("webM", "web")
+      }
+    }
+  },
+};
+
+
+
 </script>
 <style lang="less">
-.vvvv{
-    width: 100%;
-    height: 100vh;
+.vvvv {
+  width: 100%;
+  height: 100vh;
 }
 
 
@@ -43,7 +74,7 @@ export default {
     transform: translate(-50%, -50%);
     text-align: center;
     > img {
-        width: 20%;
+      width: 20%;
     }
     > p {
       font-size: 16px;

BIN
web/src/assets/img/swiper10.jpg


BIN
web/src/assets/img/swiper6.jpg


BIN
web/src/assets/img/swiper7.jpg


BIN
web/src/assets/img/swiper8.jpg


BIN
web/src/assets/img/swiper9.jpg


+ 3 - 3
web/src/utils/request.js

@@ -1,8 +1,8 @@
 import axios from 'axios'
 const service = axios.create({
-  // baseURL: 'http://192.168.0.135:8005/', // 本地调试
-  // baseURL: 'http://192.168.0.245:8005/', // 线上调试
-  baseURL: '', // build
+  // baseURL: 'http://192.168.20.135:8005/', // 本地调试
+  baseURL: 'http://192.168.20.245:8005/', // 线上调试
+  // baseURL: '', // build
   timeout: 5000
 })
 // 请求拦截器

+ 15 - 15
web/src/views/tab1/index.vue

@@ -1,15 +1,15 @@
 <!--  -->
 <template>
-<div class='tab1'>
-  <iframe src="@/pages/Home.vue" frameborder="0"></iframe>
-</div>
+  <div class='tab1'>
+    <iframe :src="`http://192.168.20.245:8005/scene/index.html?m=TEST`" frameborder="0"></iframe>
+  </div>
 </template>
 
 <script>
 export default {
   name: 'tab1',
   components: {},
-  data () {
+  data() {
     // 这里存放数据
     return {
 
@@ -24,27 +24,27 @@ export default {
 
   },
   // 生命周期 - 创建完成(可以访问当前this实例)
-  created () {
+  created() {
 
   },
   // 生命周期 - 挂载完成(可以访问DOM元素)
-  mounted () {
+  mounted() {
 
   },
-  beforeCreate () {}, // 生命周期 - 创建之前
-  beforeMount () {}, // 生命周期 - 挂载之前
-  beforeUpdate () {}, // 生命周期 - 更新之前
-  updated () {}, // 生命周期 - 更新之后
-  beforeDestroy () {}, // 生命周期 - 销毁之前
-  destroyed () {}, // 生命周期 - 销毁完成
-  activated () {} // 如果页面有keep-alive缓存功能,这个函数会触发
+  beforeCreate() { }, // 生命周期 - 创建之前
+  beforeMount() { }, // 生命周期 - 挂载之前
+  beforeUpdate() { }, // 生命周期 - 更新之前
+  updated() { }, // 生命周期 - 更新之后
+  beforeDestroy() { }, // 生命周期 - 销毁之前
+  destroyed() { }, // 生命周期 - 销毁完成
+  activated() { } // 如果页面有keep-alive缓存功能,这个函数会触发
 }
 </script>
 <style lang='less' scoped>
-.tab1{
+.tab1 {
   width: 100%;
   height: 100%;
-  iframe{
+  iframe {
     width: 100%;
     height: 100%;
   }

+ 48 - 25
web/src/views/tab2/index.vue

@@ -23,12 +23,32 @@
             <img src="../../assets/img/swiper5.png" alt="" />
             <p class="imgName">5555555555</p>
           </div>
+          <div class="swiper-slide">
+            <img src="../../assets/img/swiper6.jpg" alt="" />
+            <p class="imgName">222222222222222</p>
+          </div>
+          <div class="swiper-slide">
+            <img src="../../assets/img/swiper7.jpg" alt="" />
+            <p class="imgName">222222222222222</p>
+          </div>
+          <div class="swiper-slide">
+            <img src="../../assets/img/swiper8.jpg" alt="" />
+            <p class="imgName">222222222222222</p>
+          </div>
+          <div class="swiper-slide">
+            <img src="../../assets/img/swiper9.jpg" alt="" />
+            <p class="imgName">222222222222222</p>
+          </div>
+          <div class="swiper-slide">
+            <img src="../../assets/img/swiper10.jpg" alt="" />
+            <p class="imgName">222222222222222</p>
+          </div>
         </div>
       </div>
-      <!-- 如果需要导航按钮 -->
-      <div class="swiper-button-prev"></div>
-      <div class="swiper-button-next"></div>
     </div>
+    <!-- 如果需要导航按钮 -->
+    <div class="swiper-button-prev"></div>
+    <div class="swiper-button-next"></div>
   </div>
 </template>
 
@@ -36,7 +56,7 @@
 export default {
   name: 'tab2',
   components: {},
-  data () {
+  data() {
     // 这里存放数据
     return {}
   },
@@ -47,9 +67,9 @@ export default {
   // 方法集合
   methods: {},
   // 生命周期 - 创建完成(可以访问当前this实例)
-  created () {},
+  created() { },
   // 生命周期 - 挂载完成(可以访问DOM元素)
-  mounted () {
+  mounted() {
     // eslint-disable-next-line
     new Swiper(".swiper-container", {
       slidesPerView: 1.5,
@@ -62,13 +82,13 @@ export default {
       prevButton: '.swiper-button-prev'
     })
   },
-  beforeCreate () {}, // 生命周期 - 创建之前
-  beforeMount () {}, // 生命周期 - 挂载之前
-  beforeUpdate () {}, // 生命周期 - 更新之前
-  updated () {}, // 生命周期 - 更新之后
-  beforeDestroy () {}, // 生命周期 - 销毁之前
-  destroyed () {}, // 生命周期 - 销毁完成
-  activated () {} // 如果页面有keep-alive缓存功能,这个函数会触发
+  beforeCreate() { }, // 生命周期 - 创建之前
+  beforeMount() { }, // 生命周期 - 挂载之前
+  beforeUpdate() { }, // 生命周期 - 更新之前
+  updated() { }, // 生命周期 - 更新之后
+  beforeDestroy() { }, // 生命周期 - 销毁之前
+  destroyed() { }, // 生命周期 - 销毁完成
+  activated() { } // 如果页面有keep-alive缓存功能,这个函数会触发
 }
 </script>
 <style lang='less' scoped>
@@ -108,18 +128,18 @@ export default {
     //   transform: translate(0, 0);
     // }
     /deep/.swiper-slide.swiper-slide-active {
-      transform:scale(1.2) ;
+      transform: scale(1.2);
       overflow: visible;
       z-index: 9999 !important;
-    }    
-    /deep/.swiper-slide.swiper-slide-active >img {
+    }
+    /deep/.swiper-slide.swiper-slide-active > img {
       opacity: 1;
     }
   }
   // /deep/html:root{
   //       --swiper-theme-color: transparent !important;
   // }
-  .swiper-button-prev, .swiper-container-rtl .swiper-button-next{
+  .swiper-button-prev, .swiper-container-rtl .swiper-button-next {
     width: 70px;
     height: 70px;
     border-radius: 50%;
@@ -127,10 +147,10 @@ export default {
     border: 4px solid #fff;
     color: #fff;
     font-weight: 700;
-    background-image:none;
+    background-image: none;
     // background-image: url('../../assets/img/swiLeft.png') !important;
   }
-  .swiper-button-next, .swiper-container-rtl .swiper-button-prev{
+  .swiper-button-next, .swiper-container-rtl .swiper-button-prev {
     width: 70px;
     height: 70px;
     border-radius: 50%;
@@ -138,18 +158,21 @@ export default {
     border: 4px solid #fff;
     color: #fff;
     font-weight: 700;
-    background-image:none;
+    background-image: none;
     // background-image: url('../../assets/img/swiRight.png') !important;
   }
-  --swiper-theme-color: transparent;/* 设置Swiper风格 */
-  --swiper-navigation-color: transparent;/* 单独设置按钮颜色 */
-  --swiper-navigation-size: 30px;/* 设置按钮大小 */
-  .imgName{
+  --swiper-theme-color: transparent;
+  /* 设置Swiper风格 */
+  --swiper-navigation-color: transparent;
+  /* 单独设置按钮颜色 */
+  --swiper-navigation-size: 30px;
+  /* 设置按钮大小 */
+  .imgName {
     color: #fff;
     margin-top: -35px;
     overflow: hidden;
     text-overflow: ellipsis;
-    white-space: nowrap; 
+    white-space: nowrap;
   }
 }
 </style>

Разница между файлами не показана из-за своего большого размера
+ 9378 - 0
web/yarn.lock