|
@@ -31,51 +31,12 @@ export default {
|
|
|
return {
|
|
return {
|
|
|
isMobile: browser.mobile,
|
|
isMobile: browser.mobile,
|
|
|
hover: -1,
|
|
hover: -1,
|
|
|
- navs: [
|
|
|
|
|
- {
|
|
|
|
|
- name: "场景漫游",
|
|
|
|
|
- en_name: "Online exhibition hall",
|
|
|
|
|
- img: 2,
|
|
|
|
|
- link: "/scene?m=5",
|
|
|
|
|
- },
|
|
|
|
|
|
|
|
|
|
- {
|
|
|
|
|
- name: "馆藏鉴赏",
|
|
|
|
|
- en_name: "Collection appreciation",
|
|
|
|
|
- img: 4,
|
|
|
|
|
- link: "/antiques",
|
|
|
|
|
- },
|
|
|
|
|
- ],
|
|
|
|
|
state: false,
|
|
state: false,
|
|
|
play: false,
|
|
play: false,
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
- methods: {
|
|
|
|
|
- goPage(nav) {
|
|
|
|
|
- if (nav.link) this.$router.push(nav.link);
|
|
|
|
|
- },
|
|
|
|
|
- pullDown() {
|
|
|
|
|
- this.state = !this.state;
|
|
|
|
|
- },
|
|
|
|
|
- async playAudio() {
|
|
|
|
|
- try {
|
|
|
|
|
- await window.bg_audio.play();
|
|
|
|
|
- this.play = true;
|
|
|
|
|
- } catch (err) {
|
|
|
|
|
- console.log(err);
|
|
|
|
|
- this.play = false;
|
|
|
|
|
- }
|
|
|
|
|
- },
|
|
|
|
|
- changeAudio() {
|
|
|
|
|
- if (this.play) {
|
|
|
|
|
- window.bg_audio.pause();
|
|
|
|
|
- this.play = false;
|
|
|
|
|
- } else {
|
|
|
|
|
- window.bg_audio.play();
|
|
|
|
|
- this.play = true;
|
|
|
|
|
- }
|
|
|
|
|
- },
|
|
|
|
|
- },
|
|
|
|
|
|
|
+ methods: {},
|
|
|
computed: {
|
|
computed: {
|
|
|
width() {
|
|
width() {
|
|
|
return width;
|
|
return width;
|
|
@@ -84,33 +45,8 @@ export default {
|
|
|
return width * (1080 / 1920);
|
|
return width * (1080 / 1920);
|
|
|
},
|
|
},
|
|
|
},
|
|
},
|
|
|
- watch: {
|
|
|
|
|
- $route(a, b) {
|
|
|
|
|
- console.log(a, b);
|
|
|
|
|
- window.bg_audio.pause();
|
|
|
|
|
- this.play = false;
|
|
|
|
|
- },
|
|
|
|
|
- },
|
|
|
|
|
- mounted() {
|
|
|
|
|
- // 监听视频是否播放完毕
|
|
|
|
|
- // if (!this.state) {
|
|
|
|
|
- // document.getElementById('startvideo').loop = false // 不设置视频循环播放
|
|
|
|
|
- // document.getElementById('startvideo').addEventListener('ended', () => { //该视频播放是否已结束
|
|
|
|
|
- // this.state = true
|
|
|
|
|
- // }, false)
|
|
|
|
|
- // }
|
|
|
|
|
- window.bg_audio.autoplay = true;
|
|
|
|
|
- if (!this.play) {
|
|
|
|
|
- this.playAudio();
|
|
|
|
|
- }
|
|
|
|
|
- // window.addEventListener('message',function(event){
|
|
|
|
|
- // console.log(event);
|
|
|
|
|
- // if(that.$route.path=='/'&&event.data!=="undefined"){
|
|
|
|
|
- // that.$router.push({name:'Scene',query:{id:event.data}});
|
|
|
|
|
- // }
|
|
|
|
|
-
|
|
|
|
|
- // })
|
|
|
|
|
- },
|
|
|
|
|
|
|
+ watch: {},
|
|
|
|
|
+ mounted() {},
|
|
|
};
|
|
};
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
|
@@ -134,11 +70,11 @@ export default {
|
|
|
.title {
|
|
.title {
|
|
|
// width: 89.9vw;
|
|
// width: 89.9vw;
|
|
|
width: 7.0533rem;
|
|
width: 7.0533rem;
|
|
|
- height: .9067rem;
|
|
|
|
|
|
|
+ height: 0.9067rem;
|
|
|
// margin-top: 12vh;
|
|
// margin-top: 12vh;
|
|
|
margin-top: 1.3333rem;
|
|
margin-top: 1.3333rem;
|
|
|
- img{
|
|
|
|
|
- width: 100%;
|
|
|
|
|
|
|
+ img {
|
|
|
|
|
+ width: 100%;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|