|
@@ -105,6 +105,12 @@
|
|
|
/>
|
|
|
<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>
|
|
|
|
|
@@ -141,6 +147,9 @@ export default {
|
|
|
menuWidth: 0,
|
|
|
sceneNum: config.sceneNum,
|
|
|
SlyArr: [],
|
|
|
+
|
|
|
+ goBackArr: [],
|
|
|
+ goBackInd: null,
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
@@ -243,7 +252,36 @@ 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");
|
|
@@ -316,7 +354,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);
|
|
@@ -338,7 +376,7 @@ export default {
|
|
|
|
|
|
selected: {
|
|
|
handler: function (newVal) {
|
|
|
- this.handleVR(newVal);
|
|
|
+ // this.handleVR(newVal);
|
|
|
if (newVal.type == "4dkk") {
|
|
|
this.showList = false;
|
|
|
}
|
|
@@ -350,6 +388,19 @@ 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;
|