|
@@ -81,9 +81,10 @@
|
|
|
/>
|
|
|
<vpopup @close="handlepopClose" :cp="cp" v-if="cp" />
|
|
|
|
|
|
- <div class="jieshuo" v-show="isjieshuo">
|
|
|
- <img :src="require(`@/assets/images/jieshuo/${isSpeak?'junren_speaking':'junren_stand2'}.png`)" alt="">
|
|
|
+ <div class="jieshuo" :class="{jieshuoActive:istran,middlepos:isStartScene,jieshuospk:isSpeak}" v-show="isjieshuo">
|
|
|
+ <img :src="require(`@/assets/images/jieshuo/${isSpeak?'junren_speaking':'junren_standlook'}.png`)" alt="">
|
|
|
</div>
|
|
|
+ <div class="jieshuomask" v-if="!istran&&isStartScene"></div>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -128,6 +129,9 @@ export default {
|
|
|
},
|
|
|
|
|
|
mounted() {
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
window.addEventListener("message", (res) => {
|
|
|
if (Object.prototype.toString.call(res.data) == "[object Object]") {
|
|
|
if (res.data.source === "changeTheme") {
|
|
@@ -135,7 +139,7 @@ export default {
|
|
|
}
|
|
|
|
|
|
if (res.data.source === "bofangbgm") {
|
|
|
- this.$bus.$emit("changeBGM",true);
|
|
|
+ this.$bus.$emit("changeBGM",true);
|
|
|
}
|
|
|
|
|
|
if (res.data.source === "userInfo") {
|
|
@@ -169,6 +173,21 @@ export default {
|
|
|
},
|
|
|
"*"
|
|
|
);
|
|
|
+
|
|
|
+ window.player.director.on('jieshao',()=>{
|
|
|
+
|
|
|
+ this.isStartScene = true
|
|
|
+ let auctx = new Audio()
|
|
|
+ auctx.src = require('@/assets/audio/open.mp3')
|
|
|
+ auctx.play()
|
|
|
+ this.isSpeak = true
|
|
|
+ auctx.addEventListener('ended',()=>{
|
|
|
+ this.istran = true
|
|
|
+ this.isSpeak = false
|
|
|
+ window.startAndPlay()
|
|
|
+ })
|
|
|
+ });
|
|
|
+
|
|
|
|
|
|
window.player.director.on("linkother", data => {
|
|
|
window.parent.postMessage(
|
|
@@ -276,9 +295,11 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ istran: false,
|
|
|
isSpeak:false,
|
|
|
isjieshuo:true,
|
|
|
showExhi:false,
|
|
|
+ isStartScene:false,
|
|
|
quotes: [
|
|
|
"很漂亮的线上展馆,支持!",
|
|
|
"足不出户就能浏览参观,太棒了!",
|
|
@@ -351,19 +372,25 @@ export default {
|
|
|
@single:500px;
|
|
|
@scale:0.7;
|
|
|
|
|
|
+.jieshuomask{
|
|
|
+ position: fixed;
|
|
|
+ top: 0;
|
|
|
+ left: 0;
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+ background: rgba(0, 0, 0, 0.5);
|
|
|
+ z-index: 990;
|
|
|
+}
|
|
|
|
|
|
.jieshuo{
|
|
|
position: fixed;
|
|
|
- bottom: 0;
|
|
|
- right: 0;
|
|
|
z-index: 999;
|
|
|
width: @single * @scale;
|
|
|
height: @single* @scale;
|
|
|
overflow: hidden;
|
|
|
pointer-events: none;
|
|
|
- // animation: trantobr 2.4s 1.2s forwards;
|
|
|
-
|
|
|
-
|
|
|
+ bottom: 0;
|
|
|
+ right: 0;
|
|
|
>img{
|
|
|
width: @full * @scale;
|
|
|
left: 0;
|
|
@@ -373,6 +400,22 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+.jieshuospk{
|
|
|
+ >img{
|
|
|
+ animation: jieshuo 3.4s steps(53) infinite;
|
|
|
+ }
|
|
|
+}
|
|
|
+.middlepos{
|
|
|
+ bottom: calc(50% - 200px);
|
|
|
+ right: calc(50% - 250px);
|
|
|
+}
|
|
|
+
|
|
|
+.jieshuoActive{
|
|
|
+ animation: trantobr 1.4s linear forwards;
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
@keyframes jieshuo {
|
|
|
100% {
|
|
|
left: -@full* @scale;
|
|
@@ -381,17 +424,13 @@ export default {
|
|
|
|
|
|
@keyframes trantobr {
|
|
|
0% {
|
|
|
- top: 50%;
|
|
|
- left: 50%;
|
|
|
- transform: translate(-50%,-50%);
|
|
|
+ bottom: calc(50% - 200px);
|
|
|
+ right: calc(50% - 250px);
|
|
|
}
|
|
|
|
|
|
100% {
|
|
|
- top: unset;
|
|
|
- left: unset;
|
|
|
bottom: 0;
|
|
|
right: 0;
|
|
|
- transform: translate(0);
|
|
|
}
|
|
|
}
|
|
|
</style>
|