|
@@ -117,13 +117,17 @@ export default {
|
|
|
}
|
|
|
}, 500)
|
|
|
this.scene = this.$route.params.scene
|
|
|
-
|
|
|
window.__krfn = __krfn
|
|
|
|
|
|
this.loadScene()
|
|
|
+ this.$msgCenter.subscribe('clickHotspot', this.onClickHotspot)
|
|
|
|
|
|
- this.$msgCenter.subscribe('clickHotspot', (hotspotName) => {
|
|
|
- console.log('hotspotName: ', hotspotName)
|
|
|
+ },
|
|
|
+ beforeDestroy() {
|
|
|
+ this.$msgCenter.unsubscribe('clickHotspot', this.onClickHotspot)
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ onClickHotspot(hotspotName) {
|
|
|
let someData = this.scene.someData
|
|
|
if (typeof someData == "string") {
|
|
|
someData = JSON.parse(this.activeItem.someData)
|
|
@@ -138,9 +142,7 @@ export default {
|
|
|
// this.$router.replace({ name: 'PanoView', params: { scene: clickedHotspot.secne } })
|
|
|
}
|
|
|
}
|
|
|
- })
|
|
|
- },
|
|
|
- methods: {
|
|
|
+ },
|
|
|
loadScene() {
|
|
|
$("#pano").empty()
|
|
|
window.vrInitFn = () => {
|