|
@@ -140,6 +140,7 @@
|
|
|
<li
|
|
|
v-for="(item, index) in tourList"
|
|
|
:key="item.sid"
|
|
|
+ ref="scene-item"
|
|
|
:class="{active: curSceneIdx === index}"
|
|
|
@click="changeScene(index)"
|
|
|
>
|
|
@@ -226,6 +227,7 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
beforeMount() {
|
|
|
+ this.$msgCenter.publish('show-loading')
|
|
|
},
|
|
|
mounted() {
|
|
|
let floor = this.$route.query.floor
|
|
@@ -269,6 +271,7 @@ export default {
|
|
|
|
|
|
player.on("progress", ({ partId, frameId, progress }) => {
|
|
|
this.curSceneIdx = frameId
|
|
|
+ this.$refs['scene-item'][this.curSceneIdx].scrollIntoView()
|
|
|
this.autoMovingProgress = Number(progress * 100).toFixed(5)
|
|
|
})
|
|
|
})
|
|
@@ -304,13 +307,13 @@ export default {
|
|
|
|
|
|
// 导览数据
|
|
|
kankan.TourManager.on("loaded", (tours) => {
|
|
|
- console.log('toures: ', tours)
|
|
|
try {
|
|
|
this.tourList = tours[0].list
|
|
|
} catch (e) {
|
|
|
console.error('没拿到导览数据:', e)
|
|
|
this.tourList = []
|
|
|
}
|
|
|
+ this.$msgCenter.publish('hide-loading')
|
|
|
})
|
|
|
|
|
|
// 全部热点数据
|