|
@@ -1,7 +1,7 @@
|
|
|
<!-- 全景图 -->
|
|
|
<template>
|
|
|
<div class='travel'>
|
|
|
- <iframe src="http://www.4dmodel.com/SuperTwoCustom/shaoshan/vtour/tour.html"></iframe>
|
|
|
+ <iframe :src="iframeLink"></iframe>
|
|
|
<div class="goBack" @click="goBack()"><img src="../../assets/images/goback.png" alt=""></div>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -17,60 +17,23 @@ components: {},
|
|
|
data() {
|
|
|
//这里存放数据
|
|
|
return {
|
|
|
- pano:[{
|
|
|
- link:'http://www.4dmodel.com/SuperTwoCustom/shaoshan/vtour/tour.html',
|
|
|
- name:'start',
|
|
|
- },{
|
|
|
- link: 'http://www.4dmodel.com/SuperTwoCustom/shaoshan/vtour/life.html',
|
|
|
- name: 'life'
|
|
|
- },{
|
|
|
- link: 'http://www.4dmodel.com/SuperTwoCustom/shaoshan/vtour/topic.html',
|
|
|
- name:'topic'
|
|
|
- }
|
|
|
- ],
|
|
|
- id:'',
|
|
|
- link:'',
|
|
|
- show:false
|
|
|
+ iframeLink:""
|
|
|
};
|
|
|
},
|
|
|
//监听属性 类似于data概念
|
|
|
computed: {},
|
|
|
//监控data中的数据变化
|
|
|
watch: {
|
|
|
- id() {
|
|
|
- this.id = this.$route.query.id
|
|
|
- },
|
|
|
- show() {
|
|
|
- if(this.id=='start'){
|
|
|
- this.show = false;
|
|
|
- }else {
|
|
|
- this.show = true
|
|
|
- }
|
|
|
- }
|
|
|
},
|
|
|
//方法集合
|
|
|
methods: {
|
|
|
- getRouteData() {
|
|
|
- this.id=this.$route.query.id;
|
|
|
- console.log(this.id)
|
|
|
- },
|
|
|
goBack() {
|
|
|
history.go(-1)
|
|
|
}
|
|
|
},
|
|
|
//生命周期 - 创建完成(可以访问当前this实例)
|
|
|
created() {
|
|
|
- this.getRouteData();
|
|
|
- this.pano.forEach(item => {
|
|
|
- console.log(this.pano)
|
|
|
- if(item.name== this.id){
|
|
|
- this.link = item.link;
|
|
|
- }
|
|
|
- })
|
|
|
- this.id = this.$route.query.id;
|
|
|
- if(this.id == 'topic' || this.id == 'life') {
|
|
|
- this.show = true;
|
|
|
- }
|
|
|
+ this.iframeLink = this.$route.query.travelAround;
|
|
|
|
|
|
},
|
|
|
//生命周期 - 挂载完成(可以访问DOM元素)
|