Pārlūkot izejas kodu

修改移动端适配策略,重写移动端央视

wandequan 1 gadu atpakaļ
vecāks
revīzija
024c9e27d9

+ 63 - 2
public/static/config/config2.js

@@ -935,7 +935,7 @@ systemConfig.pointInfo = {
                 lon: 121.12262161165764, lat: 31.153863894518433, h: 1.6564816567440755
             },
             url: "https://yue.sh.gov.cn/#/location",
-            pc_url:"https://yue.sh.gov.cn/pc/serviceCenter.html?placeId=2c90fdc973d65a020173d73a03cd0002&organType=%25E5%258C%25BA%25E7%25BA%25A7%25E8%25A1%258C%25E6%2594%25BF%25E6%259C%258D%25E5%258A%25A1%25E4%25B8%25AD%25E5%25BF%2583&from=null",
+            pc_url: "https://yue.sh.gov.cn/pc/serviceCenter.html?placeId=2c90fdc973d65a020173d73a03cd0002&organType=%25E5%258C%25BA%25E7%25BA%25A7%25E8%25A1%258C%25E6%2594%25BF%25E6%259C%258D%25E5%258A%25A1%25E4%25B8%25AD%25E5%25BF%2583&from=null",
             text: []
         },
         {
@@ -1231,8 +1231,69 @@ systemConfig.pointInfo = {
                 lon: 121.12273647863168, lat: 31.153708377447124, h: 9.626361036523261
             },
             json: "./static/json/3FSCFLY.json",
-        }
+        },
 
+        // type 6 当前页面嵌入iframe展示
+        {
+            name: "视频帮办",
+            type: 6,
+            img: "./static/images/point.png",
+            sizeW: 30,
+            sizeH: 30,
+            param: {
+                lon: 121.12263801839276,
+                lat: 31.153785249294486,
+                h: 2.1
+            },
+            url: "https://zw.shqp.gov.cn/qpzw/community_pc_qp/#/online-hall-center",
+            pc_url: "",
+            text: []
+        },
+        {
+            name: "视频帮办",
+            type: 6,
+            img: "./static/images/point.png",
+            sizeW: 30,
+            sizeH: 30,
+            param: {
+                lon: 121.1226720937384,
+                lat: 31.15379110558917,
+                h: 2.1
+            },
+            url: "https://zw.shqp.gov.cn/qpzw/community_pc_qp/#/online-hall-center",
+            pc_url: "",
+            text: []
+        },
+        {
+            name: "视频帮办",
+            type: 6,
+            img: "./static/images/point.png",
+            sizeW: 30,
+            sizeH: 30,
+            param: {
+                lon: 121.12260201133859,
+                lat: 31.153778912832486,
+                h: 2.1
+            },
+            url: "https://zw.shqp.gov.cn/qpzw/community_pc_qp/#/online-hall-center",
+            pc_url: "",
+            text: []
+        },
+        {
+            name: "视频帮办",
+            type: 6,
+            img: "./static/images/point.png",
+            sizeW: 30,
+            sizeH: 30,
+            param: {
+                lon: 121.12256701590539,
+                lat: 31.153773339637965,
+                h: 2.1
+            },
+            url: "https://zw.shqp.gov.cn/qpzw/community_pc_qp/#/online-hall-center",
+            pc_url: "",
+            text: []
+        }
     ]
 }
 

+ 55 - 0
src/components/JumpWeb.vue

@@ -0,0 +1,55 @@
+<template>
+    <div class="iframeContent" v-show="show">
+        <div class="back" @click="back"></div>
+        <iframe :src="url" frameborder="0"></iframe>
+    </div>
+</template>
+
+<script>
+export default {
+    data() {
+        return {
+            url: '',
+            show: false
+        }
+    },
+    methods: {
+        back() {
+            this.$store.commit("changeJumpUrl", "");
+            this.$store.commit("changeIframeJudge", false);
+        }
+    },
+    computed: {
+        storeUrl() {
+            return this.$store.state.jumpUrl
+        },
+        iframeJudge() {
+            return this.$store.state.iframeJudge
+        }
+    },
+    watch: {
+        storeUrl(newVal, oldVal) {
+            this.url = newVal;
+        },
+        iframeJudge(newVal, oldVal) {
+            this.show = newVal;
+        }
+    }
+}
+</script>
+
+<style lang="less" scoped>
+.iframeContent {
+    position: absolute;
+    top: 0px;
+    left: 0px;
+    width: 100%;
+    height: 100%;
+    z-index: 100;
+
+    iframe {
+        width: 100%;
+        height: 100%;
+    }
+}
+</style>

+ 27 - 20
src/components/MainMap.vue

@@ -121,7 +121,7 @@ export default {
   components: {
     Tool: defineAsyncComponent(() => import("@/components/Tool.vue")),
   },
-  created() {},
+  created() { },
   mounted() {
     let that = this;
     // this.clipboard = new Clipboard(".copy_info_dialog", {
@@ -261,25 +261,23 @@ export default {
       //     }
       //   );
       // }
-      // window.changeImage = this.changeImage;
 
       // 叫号
       this.initJH();
+
       // 水面加载
       setTimeout(() => {
         that.addWaterPanel();
       }, 10000);
     },
 
+    // 延迟加载模型
     yanchiAdd3DTiles(index, keyArr) {
       let that = this;
       if (index >= keyArr.length) return;
       const str = keyArr[index];
       globalVariable.tilesArr[str] = this.add3DTilesData(
-        systemConfig.tilesConfig[str].dataUrl + str + "/tileset.json" //
-        // {
-        //   light: systemConfig.tilesConfig[str].light,
-        // }
+        systemConfig.tilesConfig[str].dataUrl + str + "/tileset.json"
       );
       setTimeout(() => {
         that.yanchiAdd3DTiles(++index, keyArr);
@@ -362,10 +360,10 @@ export default {
       let screenSpaceCameraController =
         globalVariable.viewer.scene.screenSpaceCameraController;
       screenSpaceCameraController.enableLook = bool;
-      screenSpaceCameraController.enableRotate = bool;
-      screenSpaceCameraController.enableTilt = bool;
-      screenSpaceCameraController.enableTranslate = bool;
-      screenSpaceCameraController.enableZoom = bool;
+      screenSpaceCameraController.enableRotate = bool; // 禁止旋转
+      screenSpaceCameraController.enableTilt = bool; // 禁止倾斜相机
+      screenSpaceCameraController.enableTranslate = bool; // 禁止移动
+      screenSpaceCameraController.enableZoom = bool; // 禁止缩放
     },
 
     // 默认定位
@@ -386,6 +384,7 @@ export default {
         });
       });
     },
+
     flyTo(item) {
       return new Promise((resolve, reject) => {
         globalVariable.viewer.camera.flyTo({
@@ -425,9 +424,9 @@ export default {
       // 开启场景光照
       globalVariable.viewer.scene.globe.enableLighting = true;
       // 控制太阳光
-      globalVariable.viewer.scene.sun.show = systemConfig.sunShow;
+      globalVariable.viewer.scene.sun.show = false; // systemConfig.sunShow;
       // 控制阴影
-      globalVariable.viewer.shadows = systemConfig.shadows;
+      globalVariable.viewer.shadows = false; // systemConfig.shadows;
       // 阴影强度
       globalVariable.viewer.shadowMap.darkness = systemConfig.shadowMapDarkness;
 
@@ -526,7 +525,7 @@ export default {
             cameraLat = null;
             cameraHeight = null;
           })
-          .catch((err) => {});
+          .catch((err) => { });
       }
       function huifu() {
         that.correctCamera = false;
@@ -627,8 +626,8 @@ export default {
           // cartesian = Cesium.Cartesian3.fromDegrees(lng, lat, height);
           // console.log("模型高度点", cartesian);
           let str = `
-          lon:${lon}
-          lat:${lat}
+          lon:${lon},
+          lat:${lat},
           height:${height}
           `;
           console.log(str);
@@ -644,7 +643,6 @@ export default {
         }
       }, Cesium.ScreenSpaceEventType.LEFT_CLICK);
     },
-
     /* ------------叫号------------ */
     initJH() {
       let that = this;
@@ -809,6 +807,8 @@ export default {
         api.getToken().then(function (result) {
           that.$store.commit("setToken", result.data);
           resolve();
+        }, function (err) {
+          reject(err);
         });
       });
     },
@@ -819,9 +819,13 @@ export default {
             result.data != null
               ? result.data
               : {
-                  win_status: "STOP",
-                }
+                win_status: "STOP",
+              }
           );
+        }, function (err) {
+          resolve({
+            win_status: "STOP",
+          })
         });
       });
     },
@@ -1010,9 +1014,11 @@ export default {
             });
           }
         });
+      }, function (err) {
+        console.log(err);
       });
     },
-    /* -------------------------- */
+    /* ------------------------ */
 
     // 地图添加图片
     addImage(viewer, pObj, imgUrl) {
@@ -1042,7 +1048,7 @@ export default {
           canvasWidth: 1000,
           canvasHeight: 500,
           period: 60,
-          text: "请18号前往14号服务台",
+          text: "税务综合受理",
         }).then((result) => {
           let material = Cesium.Material.fromType("Image");
           material.uniforms.image = result;
@@ -1191,6 +1197,7 @@ export default {
 .viewer_container {
   width: 100%;
   height: 100%;
+
   #cesiumContainer {
     width: 100%;
     height: 100%;

+ 29 - 39
src/components/Scene.vue

@@ -1,39 +1,18 @@
 <template>
   <div class="scene">
-    <div
-      class="scene_button"
-      :class="{ active: openStatus }"
-      @click="openSceneList"
-    ></div>
+    <div class="scene_button" :class="{ active: openStatus }" @click="openSceneList"></div>
     <div class="scene_container animate__animated" ref="scene_list">
       <!-- v-show="sceneContainerShow" -->
       <van-tabs v-model="scene_index" @change="tabChange" :animated="true">
-        <van-tab
-          v-for="(item, index) in sceneData"
-          :key="index"
-          :title="item.name"
-          :name="index"
-        >
+        <van-tab v-for="(item, index) in sceneData" :key="index" :title="item.name" :name="index">
           <div :class="[{ swiper: true }, 'mySwiper' + (index + 1)]">
             <div class="swiper-wrapper">
-              <div
-                class="swiper-slide"
-                v-for="(slide, index_) in item.children"
-                :key="index_"
-                @click="jumpScene(slide)"
-                :class="{ active: slide.active }"
-              >
+              <div class="swiper-slide" v-for="(slide, index_) in item.children" :key="index_" @click="jumpScene(slide)"
+                :class="{ active: slide.active }">
                 <img :src="slide.image" />
                 <span v-if="slide.name.length < 8">{{ slide.name }}</span>
-                <marquee
-                  v-else
-                  class="marquee"
-                  direction="left"
-                  scrollamount="1"
-                  behavior="scroll"
-                  scrolldelay="0"
-                  loop="loop"
-                >
+                <marquee v-else class="marquee" direction="left" scrollamount="1" behavior="scroll" scrolldelay="0"
+                  loop="loop">
                   {{ slide.name }}
                 </marquee>
               </div>
@@ -82,7 +61,7 @@ export default {
     setTimeout(() => {
       that.tabTendered(that.scene_index);
     }, 100);
-    window.addEventListener("onorientationchange" in window ? "orientationchange" : "resize", function() {
+    window.addEventListener("onorientationchange" in window ? "orientationchange" : "resize", function () {
       that.tabTendered(that.scene_index);
       // if(that.swiper1)that.swiper1.updateSize();
       // if(that.swiper2)that.swiper2.updateSize();
@@ -163,7 +142,7 @@ export default {
         slidesPerView: "auto", //设置slider容器能够同时显示的slides数量(carousel模式)。auto为居中显示一个
         centeredSlides: true, //若为true,那么活动块会居中,而非默认状态下的居左...false
         spaceBetween: 20, //设置每个slide之间的距离(单位px)。
-      }; 
+      };
       switch (index) {
         case 0:
           this.swiper1 = new Swiper(".mySwiper1", swiperOptions);
@@ -196,28 +175,30 @@ export default {
   left: 0px;
   bottom: 0px;
   width: 100%;
-  height:0px;
+  height: 0px;
+
   .scene_button {
     position: relative;
     z-index: 1;
-    bottom: 60px;
+    bottom: 100px;
     left: 0px;
-    width: 60px;
-    height: 60px;
-    background: url(~@/assets/img/scene/scene.png) center center/100% 100%
-      no-repeat;
+    width: 100px;
+    height: 100px;
+    background: url(~@/assets/img/scene/scene.png) center center/100% 100% no-repeat;
+
     &.active {
-      background: url(~@/assets/img/scene/scene_active.png) center center/100%
-        100% no-repeat;
+      background: url(~@/assets/img/scene/scene_active.png) center center/100% 100% no-repeat;
     }
   }
+
   .scene_container {
     position: absolute;
     z-index: 1;
-    bottom: 60px;
+    bottom: 100px;
     left: 0px;
-    height: 125px;
+    height: 250px;
     width: 100%;
+
     .van-tabs {
       :deep(.van-tabs__wrap) {
         height: 28px;
@@ -231,33 +212,41 @@ export default {
         -webkit-box-pack: center;
         -ms-flex-pack: center;
         justify-content: center;
+
         .van-tabs__nav {
           background: transparent;
           padding: 0 0;
+
           .van-tab {
             width: fit-content;
             min-width: 72px;
             max-width: 120px;
+
             .van-tab__text {
               color: #ffffff;
             }
+
             .van-tab--active {
               color: #ffffff;
             }
           }
+
           .van-tabs__line {
             bottom: 0px;
           }
         }
       }
+
       :deep(.van-tabs__content) {
         transform: translateY(-50px);
         background: #33333366;
         padding: 5px 0px;
+
         .swiper {
           width: 100%;
           height: 100%;
         }
+
         .swiper-slide {
           width: 145.5px !important;
           height: 78px !important;
@@ -279,6 +268,7 @@ export default {
             text-align: center;
             background: #33333366;
           }
+
           &.active {
             border: 2px solid #e77d00;
           }

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 218 - 321
src/components/Tool.vue


+ 55 - 0
src/components2/JumpWeb.vue

@@ -0,0 +1,55 @@
+<template>
+    <div class="iframeContent" v-show="show">
+        <div class="back" @click="back"></div>
+        <iframe :src="url" frameborder="0"></iframe>
+    </div>
+</template>
+
+<script>
+export default {
+    data() {
+        return {
+            url: '',
+            show: false
+        }
+    },
+    methods: {
+        back() {
+            this.$store.commit("changeJumpUrl", "");
+            this.$store.commit("changeIframeJudge", false);
+        }
+    },
+    computed: {
+        storeUrl() {
+            return this.$store.state.jumpUrl
+        },
+        iframeJudge() {
+            return this.$store.state.iframeJudge
+        }
+    },
+    watch: {
+        storeUrl(newVal, oldVal) {
+            this.url = newVal;
+        },
+        iframeJudge(newVal, oldVal) {
+            this.show = newVal;
+        }
+    }
+}
+</script>
+
+<style lang="less" scoped>
+.iframeContent {
+    position: absolute;
+    top: 0px;
+    left: 0px;
+    width: 100%;
+    height: 100%;
+    z-index: 100;
+
+    iframe {
+        width: 100%;
+        height: 100%;
+    }
+}
+</style>

+ 24 - 19
src/components2/MainMap.vue

@@ -2,22 +2,18 @@
   <div class="viewer_container">
     <div id="cesiumContainer">
       <!-- <div class="get_now_camera_view">
-      <van-button @click="consoleCameraPosition"> 当前视角 </van-button>
-      <van-button @click="setViewDefaultlocation"> 复位 </van-button>
-    </div>
-    <van-popup
-      v-model:show="dialogVisible"
-      :style="{ height: '50%', width: '80%' }"
-      :closed="hideInfoDailog"
-    >
-      <div>
-        <div style="font-size: 16px">{{ dialogInfoStr }}</div>
-        <van-button @click="hideInfoDailog">关 闭</van-button>
-        <van-button :class="'copy_info_dialog'" type="primary">
-          复 制
-        </van-button>
+        <van-button @click="consoleCameraPosition"> 当前视角 </van-button>
+        <van-button @click="setViewDefaultlocation"> 复位 </van-button>
       </div>
-    </van-popup> -->
+      <van-popup v-model:show="dialogVisible" :style="{ height: '50%', width: '80%' }" :closed="hideInfoDailog">
+        <div>
+          <div style="font-size: 16px">{{ dialogInfoStr }}</div>
+          <van-button @click="hideInfoDailog">关 闭</van-button>
+          <van-button :class="'copy_info_dialog'" type="primary">
+            复 制
+          </van-button>
+        </div>
+      </van-popup> -->
     </div>
     <Tool></Tool>
   </div>
@@ -121,7 +117,7 @@ export default {
   components: {
     Tool: defineAsyncComponent(() => import("@/components2/Tool.vue")),
   },
-  created() {},
+  created() { },
   mounted() {
     let that = this;
     // this.clipboard = new Clipboard(".copy_info_dialog", {
@@ -527,7 +523,7 @@ export default {
             cameraLat = null;
             cameraHeight = null;
           })
-          .catch((err) => {});
+          .catch((err) => { });
       }
       function huifu() {
         that.correctCamera = false;
@@ -809,6 +805,8 @@ export default {
         api.getToken().then(function (result) {
           that.$store.commit("setToken", result.data);
           resolve();
+        }, function (err) {
+          reject(err);
         });
       });
     },
@@ -819,9 +817,13 @@ export default {
             result.data != null
               ? result.data
               : {
-                  win_status: "STOP",
-                }
+                win_status: "STOP",
+              }
           );
+        }, function (err) {
+          resolve({
+            win_status: "STOP",
+          })
         });
       });
     },
@@ -1010,6 +1012,8 @@ export default {
             });
           }
         });
+      }, function (err) {
+        console.log(err);
       });
     },
     /* ------------------------ */
@@ -1200,6 +1204,7 @@ export default {
 .viewer_container {
   width: 100%;
   height: 100%;
+
   #cesiumContainer {
     width: 100%;
     height: 100%;

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 31 - 62
src/components2/Scene.vue


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 212 - 294
src/components2/Tool.vue


+ 9 - 26
src/views/Home.vue

@@ -88,20 +88,16 @@ export default {
     z-index: 1;
     top: 0px;
     left: 50%;
-    margin-left: -100px;
-    width: 200px;
-    height: 30px;
-    // background: url(~@/assets/img/tool/indexTitle.png) center center/100% 100%
-    //   no-repeat;
-    // background: #f7f6f4;
+    margin-left: -200px;
+    width: 400px;
+    height: 60px; 
     background: #33333366;
     border-radius: 50px;
-    font-weight: bold;
-    // color: #bfaf99;
+    font-weight: bold; 
     color: #ffffff;
     text-align: center;
-    line-height: 30px;
-    font-size: 20px;
+    line-height: 60px;
+    font-size: 40px;
     top: 20px;
   }
   .loadingVideoContainer {
@@ -111,32 +107,19 @@ export default {
     height: 100%;
     margin: 0 auto;
     background-color: #95afc0;
-
-    // top: calc(50% - 187.5px);
-    // left: calc(50% - 187.5px);
-
-    // background-image: url("~@/assets/img/loading3.gif");
-    // background-position: center center;
-    // background-size: 100%;
-    // background-repeat: no-repeat;
-
-    // video {
-    //   width: 100%;
-    //   mix-blend-mode: screen;
-    // }
     .title {
       position: absolute;
       width: 100%;
       text-align: center;
       top: 5%;
-      font-size: 25px;
+      font-size: 48px;
       font-weight: bold;
       color: #ffffff;
     }
     .content {
       color: #ffffff;
-      font-size: 16px;
-      line-height: 32px;
+      font-size: 30px;
+      line-height:48px;
       padding: 0 15px;
       width: 100%;
       box-sizing: border-box;

Daži faili netika attēloti, jo izmaiņu fails ir pārāk liels