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

背景音乐

parent 43d4fdbc
...@@ -50,6 +50,10 @@ export default { ...@@ -50,6 +50,10 @@ export default {
$this.url = '/static/audio/ready321go.mp3' $this.url = '/static/audio/ready321go.mp3'
} else if (2){ // 开始 } else if (2){ // 开始
$this.url = '/static/audio/game_running.mp3' $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(()=>{ setTimeout(()=>{
$this.setAudioPlay(0) $this.setAudioPlay(0)
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
</p> </p>
</div> </div>
<div class="rank-box"> <div class="rank-box">
</div> </div>
</div> </div>
</template> </template>
...@@ -25,7 +25,9 @@ export default { ...@@ -25,7 +25,9 @@ export default {
} }
}, },
activated () {}, activated () {},
created () {}, created () {
this.MsgBus.$emit('daojishiMp3', 4)
},
mounted () {}, mounted () {},
methods: {} methods: {}
} }
......
...@@ -927,7 +927,7 @@ ...@@ -927,7 +927,7 @@
</div> </div>
</div> </div>
</template> </template>
<template v-else> <tempclate v-else>
<div class="shuMoney" ref="shuMoney"> <div class="shuMoney" ref="shuMoney">
<!-- 顶部灯笼 --> <!-- 顶部灯笼 -->
<div class="shuMoney-disk"> <div class="shuMoney-disk">
...@@ -1006,12 +1006,17 @@ ...@@ -1006,12 +1006,17 @@
</div> </div>
</div> </div>
</div> </div>
</template> </tempclate>
<rank-list :rankingList="rankingList" v-show="status === -1"></rank-list>
</div> </div>
</template> </template>
<script> <script>
import RankingListPage from './GameRanking'
export default { export default {
components: {
'rank-list': RankingListPage
},
data() { data() {
return { return {
NUMBER_OF_LEAVES: 18, NUMBER_OF_LEAVES: 18,
...@@ -1030,6 +1035,7 @@ export default { ...@@ -1030,6 +1035,7 @@ export default {
roomPeoples:[], roomPeoples:[],
ranks:[], ranks:[],
emitList:[], emitList:[],
rankingList: [],
status:0 status:0
}; };
}, },
...@@ -1044,9 +1050,24 @@ export default { ...@@ -1044,9 +1050,24 @@ export default {
for (let i = 0; i < 10; i++) { for (let i = 0; i < 10; i++) {
this.emitList.push('temp_'+i); this.emitList.push('temp_'+i);
} }
// 监听游戏结束 展示排行榜
this.$PROXY.on("notifyMouseGamerResult", data => {
$this.getRankList(data)
})
}, },
methods: { 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() { initStatus() {
let that=this let that=this
try { try {
...@@ -1081,6 +1102,7 @@ export default { ...@@ -1081,6 +1102,7 @@ export default {
that.startGo() that.startGo()
}else if(data.status==-1){ }else if(data.status==-1){
that.status=-1 that.status=-1
that.getRankList(data.rank)
} }
} }
}); });
...@@ -1149,6 +1171,7 @@ export default { ...@@ -1149,6 +1171,7 @@ export default {
this.$PROXY.invoke("BeginGame",this.code).done(m=>{}); this.$PROXY.invoke("BeginGame",this.code).done(m=>{});
}, },
startGo(){ startGo(){
this.MsgBus.$emit('daojishiMp3', 1)
this.showPeople = false; this.showPeople = false;
this.showCount = true; this.showCount = true;
this.isShowBtn = false; this.isShowBtn = false;
...@@ -1173,6 +1196,7 @@ export default { ...@@ -1173,6 +1196,7 @@ export default {
this.totalTime = 3; this.totalTime = 3;
this.showThrityCount = true; this.showThrityCount = true;
this.showMoney = true; this.showMoney = true;
this.MsgBus.$emit('daojishiMp3', 3)
this.countDown30(); this.countDown30();
} }
}, 1000); }, 1000);
......
...@@ -380,6 +380,7 @@ export default { ...@@ -380,6 +380,7 @@ export default {
this.showCount = false this.showCount = false
this.totalTime = 3 this.totalTime = 3
this.showThrityCount = true this.showThrityCount = true
this.MsgBus.$emit('daojishiMp3', 2)
this.countDown30() this.countDown30()
this.createMouse() this.createMouse()
} }
...@@ -408,7 +409,6 @@ export default { ...@@ -408,7 +409,6 @@ export default {
// 30秒倒计时 // 30秒倒计时
countDown30 () { countDown30 () {
let $this = this let $this = this
$this.MsgBus.$emit('daojishiMp3', 2)
let clock2 = window.setInterval(() => { let clock2 = window.setInterval(() => {
this.totalTime2-- this.totalTime2--
let num = this.totalTime2.toString() 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