shaogen1995 2 år sedan
förälder
incheckning
718225e7bc
2 ändrade filer med 26 tillägg och 61 borttagningar
  1. 19 3
      QJKK/src/framework/show/index.vue
  2. 7 58
      QJKK/src/framework/show/list.vue

+ 19 - 3
QJKK/src/framework/show/index.vue

@@ -44,7 +44,6 @@
         ref="myListRef"
         :MapShow='MapShow'
         @mapClose='MapShow=false'
-        @openMapShpw='MapShow=true'
       />
       <password
         :bg="showInfo.icon"
@@ -74,7 +73,11 @@
     <!-- 倾斜摄影 -->
     <MapPage v-show="MapShow" @mapCutVr="mapCutVr" />
 
-
+    <!-- 左侧返回 -->
+    <div class="backMap" @click="MapShow = true">
+      <img src="@/assets/img/Goods/back.png" alt="" />
+      <p>返回</p>
+    </div>
   </div>
 </template>
 
@@ -305,6 +308,7 @@ export default {
     activeItem: {
       handler(newVal, oldVal) {
         if (oldVal) this.MapShow = false;
+        console.log("切换了vr", newVal);
         this.currentHotspot = "";
         $("#pano").empty();
         window.vrInitFn = () => {
@@ -383,7 +387,19 @@ export default {
 </script>
 
 <style lang="less" scoped>
-
+.backMap {
+  color: #333333;
+  position: absolute;
+  z-index: 97;
+  top: 35px;
+  left: 30px;
+  cursor: pointer;
+  width: 50px;
+  text-align: center;
+  & > img {
+    width: 50px;
+  }
+}
 .panocon {
   width: 100%;
   height: 100%;

+ 7 - 58
QJKK/src/framework/show/list.vue

@@ -81,14 +81,14 @@
                   }"
                 >
                   <img :src="handleImg(item) + `?${Math.random()}`" alt="" />
-
-                  <RollName
+                  <div class="dWenZi" :title="item.sceneTitle">{{item.sceneTitle}}</div>
+                  <!-- <RollName
                     :offset="20"
                     :active="selected.sceneCode == item.sceneCode && !MapShow"
                     class="dWenZi"
                     :myref="'subw' + item.id"
                     :name="item.sceneTitle"
-                  />
+                  /> -->
                 </div>
               </li>
             </ul>
@@ -105,19 +105,13 @@
       />
       <p :class="{ acFull: isFullscreen }">全屏</p>
     </div>
-
-    <!-- 左侧返回 -->
-    <div class="backMap" v-show="!MapShow" @click="handleVrFuToSon">
-      <img src="@/assets/img/Goods/back.png" alt="" />
-      <p>返回</p>
-    </div>
   </div>
 </template>
 
 <script>
 import { mapGetters } from "vuex";
 import config from "@/config";
-import RollName from "@/components/rollName";
+// import RollName from "@/components/rollName";
 
 import { directive } from "vue-awesome-swiper";
 // import style (<= Swiper 5.x)
@@ -126,7 +120,7 @@ import "swiper/css/swiper.css";
 let isW = window.innerWidth > 1400;
 export default {
   props: ["select", "hanpaiID", "MapShow"],
-  components: { RollName },
+  // components: { RollName },
 
   directives: {
     swiper: directive,
@@ -147,9 +141,6 @@ export default {
       menuWidth: 0,
       sceneNum: config.sceneNum,
       SlyArr: [],
-
-      goBackArr: [],
-      goBackInd: null,
     };
   },
   computed: {
@@ -252,36 +243,7 @@ export default {
       this.$refs.sw2.swiper.slideTo(i);
     },
 
-    handleVrFuToSon() {
-      if (!this.goBackArr[0].ind) {
-        // 返回地图页面
-        this.$emit("openMapShpw");
-        this.goBackInd=null
-      } else {
-        let code = this.goBackArr[0].code;
-        let ind = this.goBackArr[0].ind;
-
-        this.$refs.sw.swiper.slideTo(ind);
-        history.replaceState(
-          null,
-          null,
-          ""
-            .concat(window.location.pathname, "?")
-            .concat(`id=${this.showInfo.id}&vr=${code}`)
-        );
-        this.sceneNum = code;
-        this.goBackArr = this.goBackArr.filter((v, i) => i !== 0);
-      }
-    },
-
     handleVR(item, i = null) {
-      this.goBackArr = this.goBackArr.filter((v) => v.ind !== this.goBackInd);
-      this.goBackArr.unshift({ code: this.sceneNum, ind: this.goBackInd });
-
-      console.log("--------111", this.goBackArr);
-
-      this.goBackInd = i;
-
       if (i !== null) {
         this.$refs.sw.swiper.slideTo(i);
         this.$emit("mapClose");
@@ -354,7 +316,7 @@ export default {
       handler: function (newVal) {
         if (!newVal) {
           let tmp = this.showInfo.firstScene || this.showInfo.scenes[0];
-          // this.handleVR(tmp);
+          this.handleVR(tmp);
           return;
         }
         let val = this.showInfo.scenes.find((item) => item.sceneCode == newVal);
@@ -376,7 +338,7 @@ export default {
 
     selected: {
       handler: function (newVal) {
-        // this.handleVR(newVal);
+        this.handleVR(newVal);
         if (newVal.type == "4dkk") {
           this.showList = false;
         }
@@ -388,19 +350,6 @@ export default {
 </script>
 
 <style lang="less" scoped>
-.backMap {
-  color: #333333;
-  position: fixed;
-  z-index: 97;
-  top: 35px;
-  left: 30px;
-  cursor: pointer;
-  width: 50px;
-  text-align: center;
-  & > img {
-    width: 50px;
-  }
-}
 .txtShowBtn2 {
   position: fixed;
   z-index: 15;