|
|
@@ -3,9 +3,13 @@
|
|
|
<template v-if="showInfo">
|
|
|
<v-ifr
|
|
|
v-if="activeItem.type == '4dkk'"
|
|
|
- :key="activeItem.sceneCode"
|
|
|
- :url="`/embed.html?from=mingyuan&m=${activeItem.sceneCode}&lang=zh`"
|
|
|
+ @changeUrl="handleChange"
|
|
|
+ @otherUrl="handleOther"
|
|
|
+ :key="embeM||activeItem.sceneCode"
|
|
|
+ :url="otherLink?otherLink:`/embed.html?from=mingyuan&m=${embeM||activeItem.sceneCode}&lang=zh&scene-link=1&rnd=${rnd}`"
|
|
|
/>
|
|
|
+ <!-- -->
|
|
|
+
|
|
|
<div v-show="activeItem.type != '4dkk'" id="pano"></div>
|
|
|
|
|
|
<div
|
|
|
@@ -164,6 +168,9 @@ export default {
|
|
|
currentHotspot: "",
|
|
|
list: [],
|
|
|
loadFinish: false,
|
|
|
+ embeM:null,
|
|
|
+ otherLink:null,
|
|
|
+ rnd:null,
|
|
|
aside: [
|
|
|
{
|
|
|
id: "about",
|
|
|
@@ -177,6 +184,14 @@ export default {
|
|
|
};
|
|
|
},
|
|
|
methods: {
|
|
|
+ handleOther(data){
|
|
|
+ this.otherLink=data
|
|
|
+ this.rnd = Math.random()
|
|
|
+ },
|
|
|
+ handleChange(data){
|
|
|
+ this.embeM=data
|
|
|
+ this.rnd = Math.random()
|
|
|
+ },
|
|
|
getSceneInfomation(){
|
|
|
getSceneInfomation({id:this.activeItem.sceneCode}, (data) => {
|
|
|
this.mapvisit = data.data.mapVisi
|
|
|
@@ -386,6 +401,8 @@ export default {
|
|
|
handler(newVal) {
|
|
|
this.$nextTick(() => {
|
|
|
if (newVal.type == "4dkk") {
|
|
|
+ this.embeM = null;
|
|
|
+ this.otherLink = null;
|
|
|
removepano("#pano");
|
|
|
$("#pano").empty();
|
|
|
this.getSceneInfomation()
|
|
|
@@ -435,7 +452,10 @@ export default {
|
|
|
mounted() {
|
|
|
window.__krfn = __krfn;
|
|
|
this.$bus.on("clickHotspot", (data) => {
|
|
|
- let someData = JSON.parse(this.activeItem.someData);
|
|
|
+ let someData = this.activeItem.someData
|
|
|
+ if (typeof someData == 'string') {
|
|
|
+ someData = JSON.parse(this.activeItem.someData);
|
|
|
+ }
|
|
|
let idx = someData.hotspots.findIndex((item) => item.name == data);
|
|
|
this.currentHotspot = someData.hotspots[idx];
|
|
|
});
|