Commit 09765047 authored by 华国豪's avatar 华国豪 🙄

背景音乐

parent 43d4fdbc
......@@ -50,6 +50,10 @@ export default {
$this.url = '/static/audio/ready321go.mp3'
} else if (2){ // 开始
$this.url = '/static/audio/game_running.mp3'
} else if (3){ // 数钱 开始
$this.url = '/static/audio/countdown.mp3'
} else if (4){ // 排行榜背景音乐
$this.url = '/static/audio/get_rank.mp3'
}
setTimeout(()=>{
$this.setAudioPlay(0)
......
......@@ -10,7 +10,7 @@
</p>
</div>
<div class="rank-box">
</div>
</div>
</template>
......@@ -25,7 +25,9 @@ export default {
}
},
activated () {},
created () {},
created () {
this.MsgBus.$emit('daojishiMp3', 4)
},
mounted () {},
methods: {}
}
......
......@@ -927,7 +927,7 @@
</div>
</div>
</template>
<template v-else>
<tempclate v-else>
<div class="shuMoney" ref="shuMoney">
<!-- 顶部灯笼 -->
<div class="shuMoney-disk">
......@@ -1006,12 +1006,17 @@
</div>
</div>
</div>
</template>
</tempclate>
<rank-list :rankingList="rankingList" v-show="status === -1"></rank-list>
</div>
</template>
<script>
import RankingListPage from './GameRanking'
export default {
components: {
'rank-list': RankingListPage
},
data() {
return {
NUMBER_OF_LEAVES: 18,
......@@ -1030,6 +1035,7 @@ export default {
roomPeoples:[],
ranks:[],
emitList:[],
rankingList: [],
status:0
};
},
......@@ -1044,9 +1050,24 @@ export default {
for (let i = 0; i < 10; i++) {
this.emitList.push('temp_'+i);
}
// 监听游戏结束 展示排行榜
this.$PROXY.on("notifyMouseGamerResult", data => {
$this.getRankList(data)
})
},
methods: {
getRankList: function (data) {
if (data.length) {
data.map((x, index)=>{
this.rankingList.push({
name: x.n,
photo: x.p,
rank: x.s,
height: data.length - index
})
})
}
},
initStatus() {
let that=this
try {
......@@ -1081,6 +1102,7 @@ export default {
that.startGo()
}else if(data.status==-1){
that.status=-1
that.getRankList(data.rank)
}
}
});
......@@ -1149,6 +1171,7 @@ export default {
this.$PROXY.invoke("BeginGame",this.code).done(m=>{});
},
startGo(){
this.MsgBus.$emit('daojishiMp3', 1)
this.showPeople = false;
this.showCount = true;
this.isShowBtn = false;
......@@ -1173,6 +1196,7 @@ export default {
this.totalTime = 3;
this.showThrityCount = true;
this.showMoney = true;
this.MsgBus.$emit('daojishiMp3', 3)
this.countDown30();
}
}, 1000);
......
......@@ -380,6 +380,7 @@ export default {
this.showCount = false
this.totalTime = 3
this.showThrityCount = true
this.MsgBus.$emit('daojishiMp3', 2)
this.countDown30()
this.createMouse()
}
......@@ -408,7 +409,6 @@ export default {
// 30秒倒计时
countDown30 () {
let $this = this
$this.MsgBus.$emit('daojishiMp3', 2)
let clock2 = window.setInterval(() => {
this.totalTime2--
let num = this.totalTime2.toString()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment