|
|
@@ -7,7 +7,7 @@
|
|
|
</div>
|
|
|
<div class="swcon" v-swiper:mySwiper="swiperOption">
|
|
|
<ul class="swiper-wrapper swiper-wrapper-n">
|
|
|
- <div class="swiper-slide" v-for="(i, index) in tourList">
|
|
|
+ <div class="swiper-slide" v-for="(i, index) in tourList" :class="{ active: i.heroLocations[0].panoId == panoId }">
|
|
|
<img :src="i.heroLocations[0].thumbUrl" alt="" />
|
|
|
<div class="sl-item" :data-v="JSON.stringify(i)">
|
|
|
<span>{{ i.heroLocations[0].name }}</span>
|
|
|
@@ -22,6 +22,7 @@
|
|
|
import ClickOutside from "vue-click-outside";
|
|
|
import { directive } from "vue-awesome-swiper";
|
|
|
import "swiper/css/swiper.css";
|
|
|
+import { mapGetters, mapMutations } from "vuex";
|
|
|
export default {
|
|
|
//import引入的组件需要注入到对象中才能使用
|
|
|
components: {},
|
|
|
@@ -33,6 +34,9 @@ export default {
|
|
|
},
|
|
|
//监听属性 类似于data概念
|
|
|
computed: {
|
|
|
+ ...mapGetters({
|
|
|
+ panoId: "panoId",
|
|
|
+ }),
|
|
|
swiperOption() {
|
|
|
let that = this;
|
|
|
return {
|
|
|
@@ -68,7 +72,6 @@ export default {
|
|
|
//方法集合
|
|
|
methods: {
|
|
|
goScene(item) {
|
|
|
- console.error(1);
|
|
|
// let { panoId, quaternion } = heroLocation;
|
|
|
// // player.model.heroLocations里的那些item
|
|
|
// player.flyToPano({ pano: player.model.panos.get(panoId), quaternion });
|